os/Linux 2018. 5. 20. 16:24


Simple weather html sample with city, temperature and wind



pi@raspberrypi-touch:~ $ cat Downloads/simpleweather1_full.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<!-- <link rel="stylesheet" type="text/css" href="./css/styles.css"/>  -->

<style>
/*
  Docs at http://http://simpleweatherjs.com

  Look inspired by http://www.degreees.com/
  Used for demo purposes.

  Weather icon font from http://fonts.artill.de/collection/artill-weather-icons

  DO NOT hotlink the assets/font included in this demo. If you wish to use the same font icon then download it to your local assets at the link above. If you use the links below odds are at some point they will be removed and your version will break.
*/

@font-face {
    font-family: 'weather';
    src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/93/artill_clean_icons-webfont.eot');
    src: url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/93/artill_clean_icons-webfont.eot?#iefix') format('embedded-opentype'),
         url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/93/artill_clean_icons-webfont.woff') format('woff'),
         url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/93/artill_clean_icons-webfont.ttf') format('truetype'),
         url('https://s3-us-west-2.amazonaws.com/s.cdpn.io/93/artill_clean_icons-webfont.svg#artill_clean_weather_iconsRg') format('svg');
    font-weight: normal;
    font-style: normal;
}

html {
  width: 100%;
  height: 100%;
  background: #1192d3 url(https://s3-us-west-2.amazonaws.com/s.cdpn.io/93/austin-2.jpg) no-repeat bottom right;
  background-size: cover;
}

body {
  padding: 45px 0;
  font: 13px 'Open Sans', "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
}

#weather {
  width: 500px;
  margin: 0px auto;
  text-align: center;
  text-transform: uppercase;
}

i {
  color: #fff;
  font-family: weather;
  font-size: 150px;
  font-weight: normal;
  font-style: normal;
  line-height: 1.0;
  text-transform: none;
}

.icon-0:before { content: ":"; }
.icon-1:before { content: "p"; }
.icon-2:before { content: "S"; }
.icon-3:before { content: "Q"; }
.icon-4:before { content: "S"; }
.icon-5:before { content: "W"; }
.icon-6:before { content: "W"; }
.icon-7:before { content: "W"; }
.icon-8:before { content: "W"; }
.icon-9:before { content: "I"; }
.icon-10:before { content: "W"; }
.icon-11:before { content: "I"; }
.icon-12:before { content: "I"; }
.icon-13:before { content: "I"; }
.icon-14:before { content: "I"; }
.icon-15:before { content: "W"; }
.icon-16:before { content: "I"; }
.icon-17:before { content: "W"; }
.icon-18:before { content: "U"; }
.icon-19:before { content: "Z"; }
.icon-20:before { content: "Z"; }
.icon-21:before { content: "Z"; }
.icon-22:before { content: "Z"; }
.icon-23:before { content: "Z"; }
.icon-24:before { content: "E"; }
.icon-25:before { content: "E"; }
.icon-26:before { content: "3"; }
.icon-27:before { content: "a"; }
.icon-28:before { content: "A"; }
.icon-29:before { content: "a"; }
.icon-30:before { content: "A"; }
.icon-31:before { content: "6"; }
.icon-32:before { content: "1"; }
.icon-33:before { content: "6"; }
.icon-34:before { content: "1"; }
.icon-35:before { content: "W"; }
.icon-36:before { content: "1"; }
.icon-37:before { content: "S"; }
.icon-38:before { content: "S"; }
.icon-39:before { content: "S"; }
.icon-40:before { content: "M"; }
.icon-41:before { content: "W"; }
.icon-42:before { content: "I"; }
.icon-43:before { content: "W"; }
.icon-44:before { content: "a"; }
.icon-45:before { content: "S"; }
.icon-46:before { content: "U"; }
.icon-47:before { content: "S"; }

#weather h2 {
  margin: 0 0 8px;
  color: #fff;
  font-size: 100px;
  font-weight: 300;
  text-align: center;
  text-shadow: 0px 1px 3px rgba(0, 0, 0, 0.15);
}

#weather ul {
  margin: 0;
  padding: 0;
}

#weather li {
  background: #fff;
  background: rgba(255,255,255,0.90);
  padding: 20px;
  display: inline-block;
  border-radius: 5px;
}

#weather .currently {
  margin: 0 20px;
}
</style>
</head>
<body>


<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.simpleWeather/3.1.0/jquery.simpleWeather.min.js">
</script>

<script>
// v3.1.0
//Docs at http://simpleweatherjs.com
$(document).ready(function() {
  $.simpleWeather({
    location: 'Seoul,Korea',
    woeid: '',
    unit: 'c',
    success: function(weather) {
      html = '<h2><i class="icon-'+weather.code+'"></i> '+weather.temp+'&deg;'+weather.units.temp+'</h2>';
      html += '<ul><li>'+weather.city+', '+weather.region+'</li>';
      html += '<li class="currently">'+weather.currently+'</li>';
      html += '<li>'+weather.wind.direction+' '+weather.wind.speed+' '+weather.units.speed+'</li></ul>';
      console.log("weather code : "+weather.code);
      $("#weather").html(html);
    },
    error: function(error) {
      $("#weather").html('<p>'+error+'</p>');
    }
  });
});
</script>
<!-- Docs at http://http://simpleweatherjs.com -->
<div id="weather"></div>
</body>
</html>pi@raspberrypi-touch:~ $
pi@raspberrypi-touch:~ $


posted by cskimair
:
os/Linux 2018. 5. 20. 16:21


webbrowser kiosk mode autostart in chrome

in raspberry pi3,


running chrome in kiosk mode(no menubar, scrollbar)



pi@raspberrypi-touch:~ $ cat  .config/lxsession/LXDE-pi/autostart
@lxpanel --profile LXDE-pi
@pcmanfm --desktop --profile LXDE-pi

#@xscreensaver -no-splash

@point-rpi
#@/bin/sh /home/pi/run-glances.sh
# @/bin/sh /home/pi/run-glances-viewer.sh


# running chrome in kiosk mode(no menubar, scrollbar)
# if you kiosk mode without screen saver //{{ start of kiosk mode
# url: https://www.danpurdy.co.uk/web-development/raspberry-pi-kiosk-screen-tutorial/
#1. add comment like in following line:
#@xscreensaver -no-splash

#2. add following lines and remove comment symbol(#) :
@xset s off
@xset -dpms
@xset s noblank

#3. add following lines and remove comment symbol(#) :
sed -i 's/"exited_cleanly": false/"exited_cleanly": true/' ~/.config/chromium/Default/Preferences

#4. add web browser startup
#@chromium-browser --disable-overlay-scrollbar --noerrdialogs --kiosk http://www.kctinc.co.kr
@chromium-browser --disable-overlay-scrollbar --noerrdialogs --disable-session-crashed-bubble --disable-infobars --disable-restore-session-state --incognito --kiosk http://www.kctinc.co.kr


#5. start terminal program
@x-terminal-emulator  

#//}} end of kiosk mode
pi@raspberrypi-touch:~ $
 


posted by cskimair
:
os/Linux 2018. 5. 15. 16:39



android os install test for raspberry_pi3 and x86board(intel_nuc)

1. 개요

- 아래 2번의 설명대로 설치해서 우분투와 안드로이드x86동시 설치함.

- 단, 안드로이드의 세로회전설정이 android x86 설치후추가로 필요함.

2. How to dual-boot Android-X86 and Ubuntu

http://www.webupd8.org/2012/03/how-to-dual-boot-android-x86-and-ubuntu.html

-1) 우분투 설치시 별도 파티션을 만든다.

> /sda1: ubuntu, /dev/sda2: swap , /dev/sda3: android x86 install

-2) /dev/sda3 파티션에 android x86 을 설치함.

> 설치시 grub에 설치는 건너뛰기(skip)선택함.

3. RTAndroid , 라즈베리파이3용 안드로이드 오에스 - Android os for raspberry pi3


- https://www.youtube.com/watch?v=cU7CEOmtmRk

> RTAndroid 는 평가판이므로 적용하기에는 부적절함.

> 부팅시에 RTAndroid 로고도 부담스러움(다른 오픈소스 버젼 찾아봐야 할듯)


This video explains how you can install android 7.0 on Raspberry Pi 3.
This is the updated OS of 7th September 2016. There are so many things you can do after install Android 7.0 in Raspberry Pi 3.
Not only installing android but we will also enable the root permission and install the play in it.
You will Definitely like this video. So, What are you waiting for. Click and watch "How to install Android 7.0 on Raspberry Pi 3 with Google Play and Root"

STEPS:-
RTAndroid Here- https://git.embedded.rwth-aachen.de/r...

Android RPi discussion group- https://groups.google.com/forum/?page...

COMMAND FOR INSTALLING ANDROID-

cd Downloads

unzip rtandroid-[VERSION]-[DATE]-rpi3.zip -d path

sudo fdisk -l

./install.sh -p -f /dev/sdA
"A= your SD card letter"

COMMANDS FOR INSTALL GAPPS "GOOGLE PLAY"

cd Downloads

adb connect 192.168.1.xxx

./gapps.sh -a arm - IP

➤ GooglePlus ➤ https://www.plus.google.com/+PNPtutor...
➤ Twitter ➤ https://www.twitter.com/PNPtutorials
➤ Instagram ➤ https://www.instagram.com/PNPtutorials
➤ Facebook ➤ https://www.facebook.com/PNPtutorials
➤ Plz Donate ➤ https://www.paypal.me/PNPtutorials

Thanks for Watching :)
Subscribe for more videos :)



posted by cskimair
:
os/Linux 2018. 5. 9. 19:17

https://askubuntu.com/questions/48321/how-do-i-start-applications-automatically-on-login

http://how-do-i-start-applications-automatically-on-login

Non GUI approach

Advanced users may want to put a .desktop file in ~/.config/autostart to run applications after a user login. This may have following content:

[Desktop Entry]
Type=Application
Name=<Name of application as displayed>
Exec=<command to execute>
Icon=<full path to icon>
Comment=<optinal comments>
X-GNOME-Autostart-enabled=true



'os > Linux' 카테고리의 다른 글

webbrowser kiosk mode autostart in chrome  (0) 2018.05.20
Linux and Android os dual booting  (0) 2018.05.15
gdb로 실행시간 측정방법  (0) 2018.02.21
how to delete unused linux kernel  (0) 2018.02.19
linux lubuntu minimal installation  (0) 2017.05.17
posted by cskimair
:
os/Linux 2018. 2. 21. 16:45
Linux gdb elapsed time check
https://unix.stackexchange.com/questions/312086/elapsed-time-in-gdb/312228?noredirect=1#comment548892_312228

break *0xaddress
run
# target process is now stopped at breakpoint
python import time
python starttime=time.time()
continue
python print (time.time()-starttime






posted by cskimair
:
os/Linux 2018. 2. 19. 20:33



- how to delete unused kernel

> url: https://askubuntu.com/questions/2793/how-do-i-remove-old-kernel-versions-to-clean-up-the-boot-menu

Open terminal and check your current kernel:

uname -r 

DO NOT REMOVE THIS KERNEL!

Next, type the command below to view/list all installed kernels on your system.

dpkg --list | grep linux-image 

Find all the kernels that lower than your current kernel. When you know which kernel to remove, continue below to remove it. Run the commands below to remove the kernel you selected.

sudo apt-get purge linux-image-x.x.x-x-generic 

Finally, run the commands below to update grub2

sudo update-grub2 
Reboot your system

 




- GUI way for managing unused linux kernel

> http://ubuntuhandbook.org/index.php/2014/04/install-grub-customizer-ubuntu-1404/


> https://askubuntu.com/questions/119080/how-to-update-kernel-to-the-latest-mainline-version-without-any-distro-upgrade



posted by cskimair
: