Skip to content

Instantly share code, notes, and snippets.

View nilennoct's full-sized avatar
🎯
Focusing

nilennoct nilennoct

🎯
Focusing
View GitHub Profile
(function () {
var _window = window;
(function () {
var window = {};
Object.defineProperty(window, 'location', {
get: function () { return _window.location; },
@nilennoct
nilennoct / Neos.terminal
Created September 22, 2014 12:49
Neos.terminal
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ANSIBlackColor</key>
<data>
YnBsaXN0MDDUAQIDBAUGFRZYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3AS
AAGGoKMHCA9VJG51bGzTCQoLDA0OVU5TUkdCXE5TQ29sb3JTcGFjZVYkY2xhc3NPECYw
LjE1Mjk0MTE4MjMgMC4xNjA3ODQzMTkgMC4xNzI1NDkwMjQyABACgALSEBESE1okY2xh
c3NuYW1lWCRjbGFzc2VzV05TQ29sb3KiEhRYTlNPYmplY3RfEA9OU0tleWVkQXJjaGl2
@nilennoct
nilennoct / .vimrc
Last active August 29, 2015 14:06
.vimrc fork form amix/vimrc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Sets how many lines of history VIM has to remember
set history=700
" Enable filetype plugins
filetype plugin on
filetype indent on
@nilennoct
nilennoct / gist:ec94b72ddc03cf2eee0d
Created September 11, 2014 03:19
format number
(function (amount) {
var diff = amount.toString().length % 3;
var amountStr = ((diff === 1 ? '00' : diff === 2 ? '0' : '') + amount).replace(/(\d{3})/g, '$1,');
return amountStr.substring(diff > 0 ? 3 - diff : 0, amountStr.length - 1);
})(12000)
;@-------------------------------------------------------------------------
;@-------------------------------------------------------------------------
.globl _start
_start:
b skip
.space 0x200000-0x8004,0
#Need to install the PySerial library first
import sys, getopt
import serial
import time
def open(aport='/dev/ttyUSB0', abaudrate=115200) :
return serial.Serial(
port=aport,
baudrate=abaudrate, # baudrate
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// The raspberry pi firmware at the time this was written defaults
// loading at address 0x8000. Although this bootloader could easily
// load at 0x0000, it loads at 0x8000 so that the same binaries built
// for the SD card work with this bootloader. Change the ARMBASE
// below to use a different location.
#define ARMBASE 0x8000
@nilennoct
nilennoct / gist:5560135
Created May 11, 2013 14:39
[WeChat] Send messages automatically
// Start
var timer;
(function(msg, time) {
timer = setInterval(function() {
$('#textInput').val(msg);
$('.inputArea a.chatSend').click();
}, time);
})("Hello world!", 2000);
// Stop