This file contains 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
eCos - hal_diag_init | |
Init device '/dev/BrcmTelnetIoDriver' | |
Init device '/dev/ttydiag' | |
Init tty channel: 8130a258 | |
Init device '/dev/tty0' | |
Init tty channel: 8130a278 | |
Init device '/dev/haldiag' | |
HAL/diag SERIAL init | |
Init device '/dev/ser0' | |
BCM 33XX SERIAL init - dev: 0.2 |
This file contains 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
mod.directive('mjGridArticle', ['$state', '$location', '$timeout', function($state, $location, $timeout) { | |
return { | |
restrict: 'EA', | |
priority: 0, | |
scope: false, | |
link: function (scope, element, attrs) { | |
var render = function() { | |
var toRender = {scope:scope, state: $state, location: $location, attrs: attrs }; | |
React.renderComponent(window.GridArticle( {scope:scope, state: $state, location: $location, attrs: attrs }), element[0]); | |
}; |
This file contains 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
Index: flashchips.c | |
=================================================================== | |
--- flashchips.c (revision 1846) | |
+++ flashchips.c (working copy) | |
@@ -13137,7 +13137,40 @@ | |
.read = spi_chip_read, | |
.voltage = {2700, 3600}, | |
}, | |
+ { | |
+ .vendor = "Winbond", |
This file contains 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 mmap | |
import sys | |
with open(sys.argv[1], "r+b") as f: | |
# memory-map the file, size 0 means whole file | |
mm = mmap.mmap(f.fileno(), 0) | |
offset = int(sys.argv[2]) | |
mm[offset:] | |
f2 = sys.stdout |
This file contains 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
# -*- coding: utf-8 -*- | |
import scrapy | |
from scrapy.http.request import Request | |
from scrapy.selector import Selector | |
import urllib2 | |
import re | |
import PyV8 | |
import json |
This file contains 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
long windowId = kCGNullWindowID; | |
CGRect *temp = new CGRect; | |
// get all windows on the current screen | |
CFArrayRef windowList = CGWindowListCopyWindowInfo(kCGWindowListOptionAll | kCGWindowListOptionOnScreenOnly, kCGNullWindowID); | |
// find the current window, that will be the first one on layer 0 | |
CFIndex windowNum = CFArrayGetCount(windowList); | |
for (int i=0;i<(int)windowNum;i++) { | |
CFDictionaryRef info = (CFDictionaryRef)CFArrayGetValueAtIndex(windowList, i); |
This file contains 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 ( | |
"crypto/sha512" | |
"encoding/hex" | |
"fmt" | |
"net/http" | |
"strconv" | |
"strings" | |
) | |
func authorize(r *http.Request) (userid string, err error) { |
This file contains 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
// download zipfile | |
func ZipHandler(w http.ResponseWriter, r *http.Request) { | |
vars := mux.Vars(r) | |
token := vars["token"] | |
db, err := sql.Open("mysql", config.DSN) | |
if err != nil { | |
panic(err.Error()) // Just for example purpose. You should use proper error handling instead of panic | |
} |
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am nl5887 on github. | |
* I am remcov (https://keybase.io/remcov) on keybase. | |
* I have a public key whose fingerprint is 655E FFD1 D47E 0C42 D866 FB0C FED8 ECD4 B967 EC86 | |
To claim this, I am signing this object: |
This file contains 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 | |
# http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html | |
instanceid=`curl http://169.254.169.254/latest/meta-data/instance-id -s` | |
amiid=`curl http://169.254.169.254/latest/meta-data/ami-id -s` | |
hostname=`curl http://169.254.169.254/latest/meta-data/hostname -s` | |
instancetype=`curl http://169.254.169.254/latest/meta-data/instance-type -s` | |
kernelid=`curl http://169.254.169.254/latest/meta-data/kernel-id -s` | |
securitygroups=`curl http://169.254.169.254/latest/meta-data/security-groups -s` |