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
// WARNING: This is a bad idea. | |
// Instead, use a Deterministic random bit generator specified in NIST SP 800-90A | |
// Unverified Go implementation from the TOR project: | |
// https://gist.github.com/jpillora/ed5cf69af7d35f9bb5f1 | |
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
/* | |
* Copyright (c) 2014, Yawning Angel <yawning at torproject dot org> | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, | |
* this list of conditions and the following disclaimer. | |
* |
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
<?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"> | |
<!-- put this file in /Library/LaunchDaemons/ for root prgrams and ~/Library/LaunchAgents/ for user programs --> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>myprog</string> | |
<key>WorkingDirectory</key> | |
<string>/tmp/</string> | |
<key>Program</key> |
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
server { | |
listen {PUBLIC-GITLAB-HTTP-PORT}; #e.g. 80 | |
server_name {PUBLIC-GITLAB-HOST}; #e.g. git.mycompany.com | |
# add_header X-Frame-Options DENY; | |
add_header X-Content-Type-Options nosniff; | |
location / { | |
## Hack to implement && - Concat two strings and compare result | |
if ($args ~* "^go-get=1") { | |
set $condition goget; | |
} |
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
# install tinc | |
apt-get update && echo "===> update deps" && | |
apt-get install -y make libssl-dev zlib1g-dev liblzo2-dev libreadline-dev libncurses5-dev && echo "===> got deps" && | |
curl http://www.tinc-vpn.org/packages/tinc-1.1pre11.tar.gz | tar xzvf - && echo "===> got tinc src" && | |
cd tinc-1.1pre11 && | |
./configure && echo "===> configured tinc" && | |
make && | |
make install && echo "===> installed tinc" && | |
tinc --version # tinc version 1.1pre11 (built Nov 12 2015 16:25:28, protocol 17.4) |
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 Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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 ( | |
"encoding/binary" | |
"log" | |
"strconv" | |
) | |
func main() { | |
msg := "01011100000010101000000010011010000000100110100000001001101000000010011000101111100000001001100010111000101111001011111000000010011010000000100110100000001001100010111000101110001000001000000010011001011100010111001000000010011000101110010111000000101010000000100110100000001001101000000010011000101110001011100010111110000000100110001011100010111100101111100000001001101000000010011010000000100110100000001001100010000010000000100110001011100101110001011100100000001001100010111001011100000010101000000010011000101110001011100010111110110100101011110010111110000000100110001011100010111110110100101011110101110010000000100110100000001001101000000010011000101110001011100010111110101111001000000110000001011100100000001001100010111001011100101011110110000001011100000010100010111000101110001011110010111000101111100000001001100010111110000000100110001011100010111110000000100110001011100010111100101110011111000101111110000000100110100000 |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>event source test</title> | |
</head> | |
<body> | |
<div id="events"> | |
</div> |
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 ( | |
"fmt" | |
"log" | |
"net/http" | |
"time" | |
"github.com/NYTimes/gziphandler" | |
"github.com/donovanhide/eventsource" |
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
FROM alpine | |
MAINTAINER [email protected] | |
#configure go path | |
ENV GOPATH /root/go | |
ENV PATH $PATH:/usr/local/go/bin:$GOPATH/bin | |
#package | |
ENV PACKAGE github.com/jpillora/ssh-tron |