Skip to content

Instantly share code, notes, and snippets.

View nalakawula's full-sized avatar
👨‍💼
Working

sumarsono nalakawula

👨‍💼
Working
View GitHub Profile
@nalakawula
nalakawula / menu.ini
Created September 3, 2016 12:58
Membuat menu sederhana mengguna python untuk CHIP
Start Desktop,1,startx
Cek IP Address,2,hostname -I
Cek Hostname,3,hostname
Cek koneksi internet,4,ping -c 4 8.8.8.8
Cek Syslog,5,sudo tail -f /var/log/syslog
Cek dmesg,6,dmesg
Update Package Lists,7,sudo apt-get update
Upgrade Package,8,sudo apt-get upgrade
Konfigurasi zona waktu,9,sudo dpkg-reconfigure tzdata
Pemutar musik,10,mocp
@nalakawula
nalakawula / Error log
Created September 5, 2016 10:29
error log while flashing chip using web flasher
Flash from File [object File] stubundefined
caught usb config errorError: Failed to open device.
caught error in process head and calling handlErrorTimeoutError: operation timed out
Handling error
r__stackCleaned__: trueisOperational: truemessage: "operation timed out"name: "TimeoutError"stack: "TimeoutError: operation timed out↵ at Object.u [as pollPromise] (chrome-extension://bpohdfcdfghdcgflomadkijfdgalcgoi/scripts/bundle.min.js:4:17839)↵ at chrome-extension://bpohdfcdfghdcgflomadkijfdgalcgoi/scripts/bundle.min.js:4:4108↵From previous event:↵ at chrome-extension://bpohdfcdfghdcgflomadkijfdgalcgoi/scripts/bundle.min.js:4:4083↵From previous event:↵ at e.value (chrome-extension://bpohdfcdfghdcgflomadkijfdgalcgoi/scripts/bundle.min.js:4:3823)↵ at e.value (chrome-extension://bpohdfcdfghdcgflomadkijfdgalcgoi/scripts/bundle.min.js:4:1025)↵From previous event:↵ at e.value (chrome-extension://bpohdfcdfghdcgflomadkijfdgalcgoi/scripts/bundle.min.js:4:1157)↵ at e.value (chrome-extension://bpohdfcd
@nalakawula
nalakawula / chip boot log after upgrade to 4.4
Created September 5, 2016 10:53
chip boot log after upgrade/flash to 4.4
U-Boot SPL 2016.01-gc23364e (Jun 01 2016 - 05:57:25)
DRAM: 512 MiB
CPU: 1008000000Hz, AXI/AHB/APB: 3/2/2
Trying to boot from NAND
U-Boot 2016.01-gc23364e (Jun 01 2016 - 05:57:25 +0000) Allwinner Technology
@nalakawula
nalakawula / I2C_LCD_driver.py
Last active September 9, 2016 14:20
Menampilkan tanggal, jam, dan IP lcd 16x2 pada CHIP menggunakan i2c
# -*- coding: utf-8 -*-
# Original code found at:
# https://gist.github.com/DenisFromHR/cc863375a6e19dce359d
"""
Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic
Made available under GNU GENERAL PUBLIC LICENSE
# Modified Python I2C library for Raspberry Pi
# as found on http://www.recantha.co.uk/blog/?p=4849
@nalakawula
nalakawula / Log_install_fedora24.txt
Created September 11, 2016 13:08
Berikut ini adalah log pemasangan paket/aplikasi setelah saya install fedora 24
#Menyiapkan development environment untuk AVR karena saya sering main dengan mikrokontroler avr
sudo dnf install avr-gcc avr-gcc-c++-1\:4.9.3-2.fc24.x86_64 avr-binutils-1\:2.25-3.fc24.x86_64 avr-gdb-7.1-13.fc24.x86_64 avr-libc avarice-2.13-1.fc24.x86_64 avrdude-6.1-5.fc24.x86_64 dfu-programmer-0.6.2-5.fc24.x86_64 uisp
#install chromium, alternatif untuk firefox. Saya gunakan untuk CHIP Flahser
sudo dnf install chromium-53.0.2785.101-1.fc24.x86_64
#install alternatif photosop dan corel
sudo dnf install gimp inkscape
#install paket untuk archive
@nalakawula
nalakawula / split_string_python.py
Created September 14, 2016 07:58
Kode untuk split string setiap x karakter di python
var_1 = "saya sedang belajar untuk menjadi guru profesional"
def split_string(string, length):
return (string[0+i:length+i] for i in range(0, len(string), length))
def buat_list(data, z):
return list(split_string(data, z))
hasil = buat_list(var_1, 16)
@nalakawula
nalakawula / print_elemen_list.py
Last active September 14, 2016 08:23
print elemen dari list menggunakan for loop
hasil = ['saya sedang bela', 'jar untuk menjad', 'i guru profesion', 'al']
for x in hasil:
print x
@nalakawula
nalakawula / npm install node-red --verbose.log
Created September 20, 2016 07:06
The log from node-red installation
npm verb addRemoteTarball 'b00aaa556dd8b44568150ec9d1b953f3f90cbb61' ]
npm info retry fetch attempt 1 at 1:49:38 PM
npm info attempt registry request try #1 at 1:49:38 PM
npm http fetch GET https://registry.npmjs.org/type-is/-/type-is-1.6.13.tgz
npm verb addRemoteTarball https://registry.npmjs.org/async/-/async-0.1.22.tgz not in flight; adding
npm verb addRemoteTarball [ 'https://registry.npmjs.org/async/-/async-0.1.22.tgz',
npm verb addRemoteTarball '0fc1aaa088a0e3ef0ebe2d8831bab0dcf8845061' ]
npm info retry fetch attempt 1 at 1:49:38 PM
npm info attempt registry request try #1 at 1:49:38 PM
npm http fetch GET https://registry.npmjs.org/qs/-/qs-6.2.0.tgz
@nalakawula
nalakawula / npm install --production heapdump.log
Created September 20, 2016 07:19
log from npm install --production heapdump
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node',
npm verb cli '/usr/bin/npm',
npm verb cli 'install',
npm verb cli '--production',
npm verb cli 'heapdump',
npm verb cli '--verbose' ]
npm info using npm@2.15.9
npm info using node@v4.5.0
npm verb install initial load of /home/sumarsono/belajar-node-red/package.json
@nalakawula
nalakawula /  npm install node-red --verbose.log2
Created September 20, 2016 07:40
2nd log from npm install node-red --verbose
 sumarsono  ~  belajar-node-red  rm -rf /home/sumarsono/.node-gyp/
 sumarsono  ~  belajar-node-red  npm install node-red --verbose
npm info it worked if it ends with ok
npm verb cli [ '/usr/bin/node',
npm verb cli '/usr/bin/npm',
npm verb cli 'install',
npm verb cli 'node-red',
npm verb cli '--verbose' ]
npm info using npm@2.15.9
npm info using node@v4.5.0