This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 8f43fd71173f6da79b5029343e35285c8800a1de | |
Author: Penk Chen <[email protected]> | |
Date: Fri Dec 16 11:47:03 2016 +0000 | |
Add volatile-log boot param | |
diff --git a/init b/init | |
index 43f1571..bb7f995 100755 | |
--- a/init | |
+++ b/init |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
snap_core=core_584.snap | |
snap_kernel=pi2-kernel_24.snap | |
snappy_usb_boot=run loadfiles; setenv mmcroot "/dev/sda2 ${snappy_cmdline} snap_core=${snap_core} snap_kernel=${snap_kernel}"; run mmcargs; bootz ${loadaddr} ${initrd_addr}:${initrd_size} 0x02000000 | |
loadinitrd=load usb ${mmcdev}:${mmcpart} ${initrd_addr} ${snap_kernel}/${initrd_file}; setenv initrd_size ${filesize} | |
loadkernel=load usb ${mmcdev}:${mmcpart} ${loadaddr} ${snap_kernel}/${kernel_file} | |
uenvcmd=echo USB-BOOT; run usb_boot; run snappy_usb_boot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.0 | |
import QtWebKit 3.0 | |
import QtQuick.Window 2.2 | |
// DISPLAY=:0.0 qmlscene webview.qml | |
Window { | |
width: Screen.width | |
height: Screen.height | |
TextInput { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
#include <jpeglib.h> | |
#include <setjmp.h> | |
#include <QDebug> | |
#include <QtQml/qqml.h> | |
#include <QtQml/QQmlExtensionPlugin> | |
#include <QDir> | |
#include <tensorflow/core/framework/graph.pb.h> | |
#include <tensorflow/core/framework/tensor.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <SoftwareSerial.h> | |
#include <Servo.h> | |
// Bluetooth(RX, TX), | |
// RX and TX pins on Arduino board. | |
SoftwareSerial Bluetooth(10, 11); | |
Servo servoTurn; | |
Servo servoMove; | |
#define MAX_UARTCMDLEN 128 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- /usr/lib/python3/dist-packages/click/install.py.old 2016-01-12 19:05:39.000000000 +0000 | |
+++ /usr/lib/python3/dist-packages/click/install.py 2016-01-12 19:07:08.000000000 +0000 | |
@@ -418,7 +418,8 @@ | |
for dirpath, dirnames, filenames in os.walk(inst_dir): | |
for entry in dirnames + filenames: | |
entry_path = os.path.join(dirpath, entry) | |
- entry_mode = os.stat(entry_path).st_mode | |
+ if os.path.exists(entry_path): | |
+ entry_mode = os.stat(entry_path).st_mode | |
new_entry_mode = entry_mode | stat.S_IRGRP | stat.S_IROTH |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat test.swift | |
cat test.swift | |
func quicksort_swift(inout a:[CInt], start:Int, end:Int) { | |
if (end - start < 2){ | |
return | |
} | |
var p = a[start + (end - start)/2] | |
var l = start | |
var r = end - 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usage: casperjs 8comic.js http://new.comicvip.com/show/cool-1050.html | |
var casper = require('casper').create({ | |
pageSettings: { | |
webSecurityEnabled: false | |
} | |
}); | |
var pages, currentPage; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
D=$(date +"%Y%m%d%H%M%S") | |
size=$(adb shell "fbset|sed -n -e's/^mode.*\"\([0-9]\+x[0-9]\+\)[-\"].*$/\1/p'") | |
adb shell mirscreencast -m /var/run/mir_socket -n 1 -f /tmp/${D}.rgba | |
adb pull /tmp/${D}.rgba | |
/opt/ImageMagick/bin/convert -depth 8 -size $size ${D}.rgba ~/Desktop/${D}.png | |
/bin/rm ${D}.rgba | |
#qlmanage -p ~/Desktop/${D}.png >& /dev/null & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import QtQuick 2.0 | |
import QtGraphicalEffects 1.0 | |
Rectangle { | |
id: root | |
color: '#EEEEEE' | |
width: 960 | |
height: 768 | |
Item { |