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
var GROUP = 0; | |
var SUB_GROUP = 1; | |
... | |
releases[GROUP]; | |
releases[SUB_GROUP]; | |
function getGroup(data, releaseOffset) { |
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
var p = require("p-promise"); | |
var promise = p.defer(); | |
promise.then(function() { | |
fs.readFile("sample.json", 'utf8'); | |
}) | |
.then(function(data) { | |
var o = JSON.parse(data); | |
o.foo = "bar"; |
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
//use libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR}; | |
/* | |
rustc os.rs | |
os.rs:2:32: 2:36 error: unresolved import. maybe a missing `extern mod libc`? | |
os.rs:2 use libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR}; | |
^~~~ | |
os.rs:2:32: 2:39 error: failed to resolve import `libc::consts::os::posix88::S_IRUSR` | |
os.rs:2 use libc::consts::os::posix88::{S_IRUSR, S_IWUSR, S_IXUSR}; | |
^~~~~~~ |
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
# Mac 10.7.5 | |
# Installed go1.1.1.darwin-386.pkg from https://code.google.com/p/go/downloads/list | |
go run make.go | |
camlistore.org/pkg/rollsum | |
camlistore.org/pkg/fileembed/genfileembed | |
2013/06/22 23:28:48 Updating /Users/shout/Projects/camlistore/tmp/build-gopath/src/camlistore.org/server/camlistored/ui/zembed_base64.js.go (package ui) | |
2013/06/22 23:28:48 Updating /Users/shout/Projects/camlistore/tmp/build-gopath/src/camlistore.org/server/camlistored/ui/zembed_blob_item.css.go (package ui) | |
2013/06/22 23:28:48 Updating /Users/shout/Projects/camlistore/tmp/build-gopath/src/camlistore.org/server/camlistored/ui/zembed_blob_item.js.go (package ui) | |
... |
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 hawk | |
from hawk.util import HawkException | |
def credential_lookup(app_id): | |
# Config, filesystem, db or some other lookup | |
return credentials | |
server = hawk.Server(req, credential_lookup) | |
try: |
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 hawk | |
import requests | |
credentials = { | |
'id': 'dh37fgj492je', | |
'key': 'werxhqb98rpaxn39848xrunpaw3489ruxnpa98w4rxn', | |
'algorithm': 'sha256' | |
} |
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
Mozilla websites which consume the MozLDAP web services should do so in a secure manner. | |
1) They should be done of https | |
2) They should sign their requests | |
3) MozLDAP should verify request signatures, before servicing a request. | |
Each webapp would have to register the following: |
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
javascript:(function(){var%20prefixes=['','glocken','das','borfa','maushe','uber'],suffixes=['','hausen','%20die%20vander','gleuten','noshan','flagellan','mek','dak','en%20das','ga'],xPathResult=document.evaluate('.//text()[normalize-space(.)!=\'\']',document.body,null,XPathResult.ORDERED_NODE_SNAPSHOT_TYPE,null),i,textNode,cnt,out,j,pfx,sfx;for(i=0,l=xPathResult.snapshotLength;i<l;i++){textNode=xPathResult.snapshotItem(i);if(textNode.parentNode.nodeName.toLowerCase()=='script'||textNode.tagName=='style')continue;cnt=textNode.data.split(/\s/g);out=[];for(j=0;j<cnt.length;j++){if(cnt[j].replace(/[\s]/g,'')=='')continue;pfx=(!Math.floor(Math.random()*10))?'':prefixes[Math.floor(Math.random()*prefixes.length)];sfx=(!Math.floor(Math.random()*10))?'':suffixes[Math.floor(Math.random()*suffixes.length)];out.push(pfx+cnt[j]+sfx);}textNode.data='%20'+out.join('%20')+'%20';}})(); |