The spec has moved to a repo: https://github.com/defunctzombie/package-browser-field-spec to facilitate collaboration.
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
// | |
// Implementation using express-jwt middle | |
// | |
var express = require('express'), | |
ejwt = require('express-jwt'), | |
jwt = require('jsonwebtoken'), | |
passport = require('passport'), | |
bodyParser = require('body-parser'), | |
LocalStrategy = require('passport-local').Strategy, | |
BearerStrategy = require('passport-http-bearer').Strategy; |
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/bash | |
#Thanks to this page: http://chris-allen-lane.com/2012/12/phonegap-compiling-a-release-apk-without-using-phonegap-build/ | |
#USAGE! | |
# 1. Replace <AndroidKeyName> with the filename of the keyfile generated (see url) | |
# 2. Replace <ProjectName> with the project name in the generated file form cordova, see path/to/my/project/platforms/android/bin and look for an APK if you need help | |
# 3. Replace <AndroidKeyNameAlias> from the alias used when generating the key (see url again!) | |
# 4. Edit path/to/my/project/platforms/android/AndroidManifest.xml and change "debuggable=false" (search for it!) | |
# 5. Check path/to/my/project/Release/android for your sparkling new apk! | |
# | |
# This worked and was uploadable to the google play store. |
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
#define _XOPEN_SOURCE 700 | |
#include <signal.h> | |
#include <unistd.h> | |
int main() | |
{ | |
sigset_t set; | |
int status; | |
if (getpid() != 1) return 1; |
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
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<!-- | |
Documented at | |
http://linux.die.net/man/5/fonts-conf | |
To check font mapping run the command at terminal | |
$ fc-match 'helvetica Neue' |
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
# PKGW customizations | |
# Greek ambiguities: epsilon/eta, theta/tau, pi/phi/psi, omega/omicron | |
<Multi_key> <backslash> <comma> : " " U202F # thin nonbreaking space | |
<Multi_key> <g> <a> : "α" | |
<Multi_key> <g> <b> : "β" | |
<Multi_key> <g> <g> : "γ" | |
<Multi_key> <g> <d> : "δ" | |
<Multi_key> <g> <3> : "ε" # note! |
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
var empty_list = function(selector) { | |
return selector(undefined, undefined, true); | |
}; | |
var prepend = function(el, list) { | |
return function(selector) { | |
return selector(el, list, false); | |
}; | |
}; | |
var head = function(list) { |
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
Function.prototype.kwargs = function() | |
{ | |
var argNames, kwargs, args = [], thisObject; | |
for (var i=0; i<arguments.length; i++){ | |
var obj = arguments[i]; | |
if (Object(obj) !== obj){ | |
continue; | |
} | |
for (var key in obj){ |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
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
[ | |
{ | |
line: "Сокольническая линия", | |
stations: ["Улица Подбельского", "Черкизовская", "Преображенская площадь", "Сокольники", "Красносельская", "Комсомольская", "Красные ворота", "Чистые пруды", "Лубянка", "Охотный ряд", "Библиотека имени Ленина", "Кропоткинская", "Парк культуры", "Фрунзенская", "Спортивная", "Воробьёвы горы", "Университет", "Проспект Вернадского", "Юго-Западная"] | |
}, | |
{ | |
line: "Замоскворецкая линия", | |
stations: ["Красногвардейская", "Домодедовская", "Орехово", "Царицыно", "Кантемировская", "Каширская", "Коломенская", "Автозаводская", "Павелецкая", "Новокузнецкая", "Театральная", "Тверская", "Маяковская", "Белорусская", "Динамо", "Аэропорт", "Сокол", "Войковская", "Водный стадион", "Речной вокзал"] | |
}, | |
{ |
NewerOlder