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
import os | |
import sys | |
def DOUBLE_FORK(): | |
"""Perform a UNIX double-fork to detach, and re attach process to init so it's not a child of web worker""" | |
# do the UNIX double-fork magic, see Stevens' "Advanced | |
# Programming in the UNIX Environment" for details (ISBN 0201563177) | |
try: | |
pid = os.fork() | |
if pid > 0: |
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/sh -f | |
# things to do for travis-ci in the before_install section | |
if ( test "`uname -s`" = "Darwin" ) | |
then | |
#cmake v2.8.12 is installed on the Mac workers now | |
#brew update | |
#brew install cmake | |
echo |
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
["A# .NET","A# (Axiom)","A-0 System","A+","A++","ABAP","ABC","ABC ALGOL","ABLE","ABSET","ABSYS","ACC","Accent","Ace DASL","ACL2","ACT-III","Action!","ActionScript","Ada","Adenine","Agda","Agilent VEE","Agora","AIMMS","Alef","ALF","ALGOL 58","ALGOL 60","ALGOL 68","ALGOL W","Alice","Alma-0","AmbientTalk","Amiga E","AMOS","AMPL","APL","App Inventor for Android's visual block language","AppleScript","Arc","ARexx","Argus","AspectJ","Assembly language","ATS","Ateji PX","AutoHotkey","Autocoder","AutoIt","AutoLISP / Visual LISP","Averest","AWK","Axum","B","Babbage","Bash","BASIC","bc","BCPL","BeanShell","Batch (Windows/Dos)","Bertrand","BETA","Bigwig","Bistro","BitC","BLISS","Blue","Bon","Boo","Boomerang","Bourne shell","bash","ksh","BREW","BPEL","C","C--","C++","C#","C/AL","Caché ObjectScript","C Shell","Caml","Candle","Cayenne","CDuce","Cecil","Cel","Cesil","Ceylon","CFEngine","CFML","Cg","Ch","Chapel","CHAIN","Charity","Charm","Chef","CHILL","CHIP-8","chomski","ChucK","CICS","Cilk","CL","Claire","Clarion","Clean", |
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
# This function is a translation of the PHP function described at | |
# http://thisisnotajoke.com/2011/07/12/aaaa-for-tinydns-php-function/ | |
def ipv6octal(ipv6): | |
while len(ipv6.split(':')) < 8: | |
ipv6 = ipv6.replace('::', ':::') | |
octets = [] | |
for part in ipv6.split(':'): | |
if not part: | |
octets.extend([0, 0]) | |
else: |
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'?> | |
<feed> | |
<!-- Easiest way to generate this file is to create a new blog in the template you want, | |
export a blank Atom dump for it, and add the string "INSERT HERE" between XML comments | |
just before the closing feed tag --> | |
<!-- Like this: --> | |
<!-- INSERT HERE --> | |
</feed> |
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
[ | |
"Damn", | |
"Crazy", | |
"Singing", | |
"Noisy", | |
"Music", | |
"Loving", | |
"Broken", | |
"Happy", | |
"Depressed", |
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
# Works on Elixir 1.0.x | |
# Usage: just paste to `iex` shell, or run `elixir conway.ex` | |
defmodule Sum do | |
defstruct value: 0 | |
def value(%Sum{value: value}), do: value | |
def add(%Sum{value: value} = sum, x) do | |
%Sum{sum | value: value + x} |
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
--- | |
sitemap: false | |
--- | |
{ | |
"version": "https://jsonfeed.org/version/1", | |
"title": "{{ site.title }}", | |
"home_page_url": "{{ site.url }}/", | |
"feed_url": "{{ site.url }}/feed.json", |
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
javascript: | |
/* Usage: | |
Copy the contents of this file and paste into the url of a new bookmark to make the bookmarklet. | |
Click the bookmarklet to make a Diigo bookmark to the current page with the tag 'oneclick'. It will bring up a popup, which will close 2 seconds after you click anywhere on the bookmarked page, or after you leave the bookmarked page. | |
Feel free to edit and improve, this was just a quick hack. | |
*/ | |
(function(){ | |
var path = 'https://secure.diigo.com/api/v2/bookmarks'; | |
var params = { |
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
javascript:!function(){___rotate=window.___rotate||0,___rotate++,___rotate>3&&(___rotate=0);var t=document.documentElement,o=t.clientWidth,e=t.clientHeight,r=document.body,i=r.style;0===___rotate?(i.transform="",i.position="",i.width="",i.height="",i.left="",i.top=""):1===___rotate?(i.transform="rotate(90deg)",i.transformOrigin="top left",i.position="absolute",i.width=e+"px",i.height=o+"px",i.left="100%",i.top="0"):2===___rotate?(i.transform="rotate(180deg)",i.transformOrigin="top left",i.position="absolute",i.width=o+"px",i.height=e+"px",i.left="100%",i.top="100%"):3===___rotate&&(i.transform="rotate(270deg)",i.transformOrigin="top left",i.position="absolute",i.width=e+"px",i.height=o+"px",i.left="0",i.top="100%")}(); |