Skip to content

Instantly share code, notes, and snippets.

View 173210's full-sized avatar

173210

View GitHub Profile
gyp_qtwebengine "/home/root3/buildroot/output/build/qt5webengine-5.6.0/src/core" -D qt_cross_compile=1 -D os_posix=1 -D qt_os="embedded_linux" -I config/embedded_linux.gypi -D use_qt=1 -D v8_use_external_startup_data=0 -D enable_basic_printing=0 -D enable_print_preview=0 -D enable_web_speech=0 -D linux_use_bundled_gold=0 -D linux_use_bundled_binutils=0 -D linux_use_gold_flags=0 -D toolkit_uses_gtk=0 -D use_ash=0 -D use_aura=1 -D use_cairo=0 -D use_clipboard_aurax11=0 -D use_cups=0 -D use_gconf=0 -D use_gio=0 -D use_gnome_keyring=0 -D use_kerberos=0 -D use_pango=0 -D use_nss_certs=0 -D use_openssl=1 -D use_openssl_certs=1 -D use_system_libpng=1 -D use_pulseaudio=0 -D use_system_ffmpeg=1 -D clang=0 -D desktop_linux=0 -D disable_nacl=1 -D embedded=1 -D enable_autofill_dialog=0 -D enable_automation=0 -D enable_captive_portal_detection=0 -D enable_extensions=0 -D enable_google_now=0 -D enable_language_detection=0 -D enable_managed_users=0 -D enable_plugin_installation=0 -D enable_plugins=0 -D enable_printing=0 -D
unsigned long ul;
ul = 0;
context->edge[context->param] = ul;
context->param++;
printf("%p: %lu, %p: %lu\n",
&context->edge[context->param], context->edge[context->param],
&context->param, context->param);
$ ./char < sample.csv
48, 0x30, '0'
44, 0x2C, ','
49, 0x31, '1'
44, 0x2C, ','
52, 0x34, '4'
13, 0x0D
10, 0x0A
49, 0x31, '1'
44, 0x2C, ','
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.6.0 (root3@root3-X220t) (gcc version 5.3.0 (Buildroot 2016.05-rc1-00030-gdc9ead8-dirty) ) #1 PREEMPT Sun May 22 23:01:28 JST 2016
[ 0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[ 0.000000] Machine model: Raspberry Pi Model B Plus Rev 1.2
[ 0.000000] bootconsole [earlycon0] enabled
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] WARNING: CPU: 0 PID: 0 at kernel/printk/printk.c:2490 register_console+0x50/0x3f8
[ 0.000000] console 'earlycon0' already registered
[ 0.000000] Modules linked in:
@173210
173210 / humaritarian.md
Created May 18, 2016 08:11
Humaritarian Interventions

Source

Mainly from Wikipedia

International Rules

  • Respect for sovereignty and human rights are conflicting.

Humaritarian Interventions

  • A solution for the conflicts
  • [CONCERN] Is it reasonable?
-pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=/home/root3/buildroot/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot -mfloat-abi=hard
/home/root3/buildroot/output/host/usr/bin/arm-buildroot-linux-gnueabihf-g++ -c -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=/home/root3/buildroot/output/host/usr/arm-buildroot-linux-gnueabihf/sysroot -O2 -O3 -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -fno-exceptions -Wall -W -D_REENTRANT -fPIC -DQT_NO_MTDEV -DQT_NO_LIBUDEV -DQT_NO_TSLIB -DQT_NO_LIBINPUT -DQT_BUILD_WEBENGINEWIDGETS_LIB -DQT_UI_DELEGATES -DQT_BUILD_WEBENGINEWIDGETS_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_WEBENGINE_LIB -DQT_QUICK_LIB -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_QML_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB
configure:4261: checking for C compiler default output file name
configure:4283: sh4a-elf-gcc conftest.c >&5
/home/root3/devkitPro/devkitSH4/lib/gcc/sh4a-elf/5.3.0/../../../../sh4a-elf/bin/ld: cannot find crt1.o: No such file or directory
/home/root3/devkitPro/devkitSH4/lib/gcc/sh4a-elf/5.3.0/../../../../sh4a-elf/bin/ld: cannot find crti.o: No such file or directory
/home/root3/devkitPro/devkitSH4/lib/gcc/sh4a-elf/5.3.0/../../../../sh4a-elf/bin/ld: cannot find crtbegin.o: No such file or directory
/home/root3/devkitPro/devkitSH4/lib/gcc/sh4a-elf/5.3.0/../../../../sh4a-elf/bin/ld: cannot find -lgcc
/home/root3/devkitPro/devkitSH4/lib/gcc/sh4a-elf/5.3.0/../../../../sh4a-elf/bin/ld: cannot find -lgcc-Os-4-200
/home/root3/devkitPro/devkitSH4/lib/gcc/sh4a-elf/5.3.0/../../../../sh4a-elf/bin/ld: cannot find -lnosys
/home/root3/devkitPro/devkitSH4/lib/gcc/sh4a-elf/5.3.0/../../../../sh4a-elf/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
wget http://bazaar.launchpad.net/~ubuntu-bugcontrol/qa-regression-testing/master/download/head:/canonicalmasterpubli-20121127224415-zwfgigzh3kstgk0g-3/canonical-master-public.der
efi-readvar -v PK -o PK.esl
efi-readvar -v KEK -o KEK.esl
efi-readvar -v db -o db.esl
efi-readvar -v dbx -o dbx.esl
: enter setup mode using the option in BIOS
efi-updatevar -e -f KEK.esl KEK
efi-updatevar -e -f db.esl db
efi-updatevar -e -f dbx.esl dbx
efi-updatevar -a -c canonical-master-public.der KEK
@173210
173210 / prof.md
Last active March 28, 2016 01:22
Chrome Profiling and Debugging
5,060	109,469	22	3,288	1	603	CrBrowserMain	CrBrowserMain	Browser	1818	ScheduledActionSendBeginMainFrame	single_thread_proxy.cc [738]

Profiling Chromium and Blink - The Chromium Projects

gperftools

The gperftools project, from which we get TCMalloc, also includes a very nice profiler: Google CPU Profiler.

Get the Code: Checkout, Build, Run & Submit - The Chromium Projects

However, if you choose to clone without git history, the checkout will total ~7.2GB. Use --no-history with fetch to create shallow clones. Use this if you don't need repo history or want a faster clone. Later, git fetch --unshallow can be used to deepen these shallow clones.

@173210
173210 / yats.js
Created March 26, 2016 05:56
A Piece of Shit
const user = value.user_id;
if (!users[user]) {
pendingUsers++;
idb.transaction("users", "readwrite")
.objectStore("users")
.openCursor(user)
.onsuccess = function(usersEvent)
{
if (!value.oauth_token || !value.oauth_token_secret) {
sessionStorage.setItem("search", searchBody);