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
81a82,88 | |
> static const char *respRobots = | |
> "HTTP/1.1 200 OK" CRLF | |
> "Content-Type: text/plain" CRLF | |
> "Content-Length: 26" CRLF CRLF | |
> "User-Agent: *" CRLF | |
> "Disallow: /"; | |
> | |
99c106 | |
< char rbuf[16]; |
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 WebSocketServer = require('ws').Server; | |
var net = require('net'); | |
var wss = new WebSocketServer({port:9696,host:'0.0.0.0'}); | |
wss.on('connection', function(ws) { | |
console.log('wsconn'); | |
var sock_ready = false; | |
var send_queue = []; | |
var sock = net.createConnection(9695); | |
ws.on('message',function(message){ |
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 | |
# USAGE | |
# 1. clone / check out a repo to reponame/ | |
# 2. execute once: echo 0 > reponame/repo2email.ver | |
# 3. if needed, create reponame/repo2email.prepare.sh script which will be called before packaging | |
# 4. set up crontab to execute: ./repo2email.sh 'reponame' 'svn' '[email protected];[email protected]' | |
reponame=$1 | |
repotype=$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
#!/bin/bash | |
# NDN platform easy installer for Ubuntu 12.04 | |
# programs included: | |
# NDNx (with ndnd /robots.txt patch) | |
# CCNx shim for NDNx | |
# NDNLP | |
# ndnping | |
# PyNDN | |
# updated: 2013-09-02 |
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" encoding="UTF-8"?> | |
<language id="oberon0" _name="Oberon0" version="2.0" _section="Sources"> | |
<metadata> | |
<property name="globs">*.ob0;*.ob</property> | |
</metadata> | |
<styles> | |
<style id="comment" _name="Comment" map-to="def:comment"/> | |
<style id="error" _name="Error" map-to="def:error"/> | |
<style id="string" _name="String" map-to="def:string"/> |
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 | |
# CCNx shim for NDNx | |
# This script creates shim headers so that apps written for CCNx can compile with NDNx. | |
# NDNx is available at https://github.com/named-data/ndnx | |
# | |
# Usage: sudo ./ndnx-ccnx-shim.sh | |
# updated: 2013-09-02 | |
INCLUDE_DIR=/usr/local/include |
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
@@ -81,6 +81,13 @@ | |
"HTTP/1.1 405 Method Not Allowed" CRLF | |
"Connection: close" CRLF CRLF; | |
+static const char *respRobots = | |
+ "HTTP/1.1 200 OK" CRLF | |
+ "Content-Type: text/plain" CRLF | |
+ "Content-Length: 26" CRLF CRLF | |
+ "User-Agent: *" CRLF | |
+ "Disallow: /"; |
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
spreadsheet2sjtubbs script | |
This script updates the contents of a worksheet in Google Spreadsheet into a post at SJTUBBS. | |
Setup instructions: | |
1. Download a copy of config.inc.php and spreadsheet2sjtubbs.cli.php | |
2. Open the Spreadsheet, click [File - Publish to the Web] menu item, | |
click [Start Publishing] | |
3. In [Get a link to the published data], |
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 | |
# https://gist.github.com/yoursunny/6297f3c70f5441213184 | |
LICENSE_NFD='''/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | |
/* | |
* Copyright (c) 2014-2019, Regents of the University of California, | |
* Arizona Board of Regents, | |
* Colorado State University, | |
* University Pierre & Marie Curie, Sorbonne University, | |
* Washington University in St. Louis, |
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
#!/usr/bin/python2 | |
# https://www.facebook.com/permalink.php?story_fbid=921147667906858&id=531306850224277 | |
# My confession is that technically I have probably kissed 1/20th of the Student body here are U of A. It's truly embarrassing to say but I'm glad to get that off my chest. -EOS | |
# Number of students at U of A = 50,000; You claim to kiss: 1/20 x 50,000 = 2,500; Math, Bitch!! | |
# This script computes number of kisses necessary to kiss 2500 unique students, or the entire student body. | |
import random |
OlderNewer