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
| package main | |
| import ( | |
| "github.com/gopherjs/gopherjs/js" | |
| "github.com/rolaveric/pet" | |
| ) | |
| func main() { | |
| js.Global.Set("pet", map[string]interface{}{ | |
| "New": pet.New, |
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 r=require("request") | |
| function cypher(query,params,cb) { | |
| r.post({uri:"http://localhost:7474/db/data/transaction/commit", | |
| json:{statements:[{statement:query,parameters:params}]}}, | |
| function(err,res) { cb(err,res.body)}) | |
| } | |
| var query="MATCH (n:User) RETURN n, labels(n) as l LIMIT {limit}" | |
| var params={limit: 10} | |
| var cb=function(err,data) { console.log(JSON.stringify(data)) } |
Digital cryptography! This is a subject I've been interested in since taking a class with Prof. Fred Schneider back in college. Articles pop up on Hacker News fairly often that pique my interest and this technique is the result of one of them.
Specifically, this is about Lamport signatures. There are many signature algorithms (ECDSA and RSA are the most commonly used) but Lamport signatures are unique because they are formed using a hash function. Many cryptographers believe that this makes them resistant to attacks made possible by quantum computers.
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
| # This is an example of metaprogramming in the Elixir language. | |
| # | |
| # We will define a domain specific language (DSL) for the definition | |
| # of a service which is watched by several sensors. | |
| # Each sensor watches some property/functionality of the service and | |
| # returns the result of the check. | |
| # | |
| # To determine if the service is functioning properly, we need functions | |
| # to run all the sensors' code and gather the returned data. | |
| # |
THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.
PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!
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
| (defmodule joes-fav | |
| (export all)) | |
| (defun universal-server () | |
| (receive | |
| ((tuple 'become server-function) | |
| (funcall server-function)))) | |
| (defun factorial | |
| ((0) 1) |
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
| HEDGE = node riphedge | |
| all: | |
| npm install ripple-lib | |
| hedge: | |
| -while date; do \ | |
| $(HEDGE); \ | |
| sleep 100; \ | |
| done |
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
| <html> | |
| <head> | |
| <title>Test</title> | |
| <script src="http://code.jquery.com/jquery-1.9.1.js"></script> | |
| <script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script> | |
| <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" /> | |
| <script src="http://fb.me/react-0.5.1.js"></script> | |
| <script src="http://fb.me/JSXTransformer-0.5.1.js"></script> | |
| </head> |
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
| /* | |
| Gmail/Google Reader Sidebar Scroll Shadows | |
| ------------------------------------------- | |
| Neat effect that mimics the scroll shadows that appear in the GOogle sitde bar and visually cues users to scroll up or down depending on their position. | |
| Credit goes to Lea Verou for this awesome find. | |
| Source: | |
| Lea's Talk: http://www.youtube.com/watch?v=3ikye7Qc7Ak | |
| Code Source: http://lea.verou.me/more-css-secrets/#slide9 | |