Skip to content

Instantly share code, notes, and snippets.

@AlexanderAA
AlexanderAA / filetypes.Tj.conf
Last active December 22, 2016 14:00
Taskjuggler syntax highlighting for Geany editor
# For complete documentation of this file, please see Geany's main documentation
[styling=C]
[keywords]
# all items must be in one line
primary=accountprefix accountreport accountroot active adopt aggregate alert alertlevels alternative author auxdir balance caption cellcolor celltext center charge chargeset columnid columns complete copyright credits currency currencyformat dailymax dailymin dailyworkinghours date definitions depends details disabled duration efficiency effort effortdone effortleft email enabled end endcredit epilog fail flags fontcolor footer formats functions gapduration gaplength halign hasalert header headline height hideaccount hidejournalentry hidereport hideresource hidetask icalreport include inherit interval1 interval2 interval3 interval4 isactive ischildof isdependencyof isdutyof isfeatureof isleaf ismilestone isongoing isresource isresponsibilityof istask isvalid journalattributes journalmode leaveallowance leaves length limits listitem listtype loadunit logicalexpression logical
@AlexanderAA
AlexanderAA / filetypes.Ur.conf
Last active December 22, 2016 13:59
Ur/Web syntax highlighting for Geany editor
# For complete documentation of this file, please see Geany's main documentation
[styling=CAML]
[keywords]
keywords=and con constraint constraints cookie datatype end fn fun open sequence struct structure style table task type val view
keywords_optional=
[lexer_properties=CAML]
[settings]
#superfish relayd.conf example.
# Using Lenovo's pre-installed "superfish" private key and CA certificate.
# http://support.lenovo.com/us/en/product_security/superfish
# First set up a redirection in pf.conf:
#pass in on $int_if inet proto tcp to port 443 divert-to 127.0.0.1 port 8080
#pass out on $ext_if nat-to ($ext_if:0)
# Now get the superfish.pem online, eg. from:
# https://gist.github.com/mathiasbynens/7a13a467b22c42505490
@mrb
mrb / typecher.ml
Created February 20, 2014 01:21
Simple Typed Lambda Calculus Typechecking Function in OCaml
let rec typeof ctx t =
match t with
TmVar(fi,i,_) -> getTypeFromContext fi ctx i
| TmAbs(fi,x,tyT1,t2) ->
let ctx' = addbinding ctx x (VarBind(tyT1)) in
let tyT2 = typeof ctx' t2 in
TyArr(tyT1, tyT2)
| TmApp(fi,t1,t2) ->
let tyT1 = typeof ctx t1 in
let tyT2 = typeof ctx t2 in
module Main where
import Data.WAVE
import Prelude hiding (length, sum, map, zipWith, (++), foldr, concat, zip3,
replicate, concatMap)
import qualified Prelude as P
import Data.Complex
import Data.Vector
import Data.Bits
import System.Environment (getArgs)
@datagrok
datagrok / gist:2199506
Last active April 8, 2023 17:36
Virtualenv's `bin/activate` is Doing It Wrong
@aslatter
aslatter / happstack-wai.hs
Created January 26, 2012 04:33
Convert a happstack app to a wai app
{-# LANGUAGE OverloadedStrings #-}
module Happstack.Server.Wai
( toApplication
, run
, Warp.Port
-- ** Low-level functions
, convertRequest
, convertResponse
) where
@qbit
qbit / npm_openbsd
Created May 1, 2011 16:06
openbsd npm install fix
diff --git a/lib/utils/tar.js b/lib/utils/tar.js
index 8c5bf94..ffa4ac1 100644
--- a/lib/utils/tar.js
+++ b/lib/utils/tar.js
@@ -167,11 +167,18 @@ function gunzTarPerm (tarball, tmp, dMode, fMode, uid, gid, cb) {
//console.error(npm.config.get("gzipbin")+" --decompress --stdout "
// +tarball+" | "+npm.config.get("tar")+" -mvxpf - --no-same-owner -C "
// +tmp)
+ var os = require("os");
+ var opts = [ "-mvxpf", "-", "--no-same-owner", "-C", tmp];
@blister
blister / gist:740829
Created December 14, 2010 18:19
Bash script to add a delay to the localhost interface on Linux machines
#!/bin/bash
# Copyright 2010 Eric Ryan Harrison <me@ericharrison.info>
# Inspired by:
# http://daniel.haxx.se/blog/2010/12/14/add-latency-to-localhost/
if [ -n "$1" ]
then
if [ "$1" = "off" ]
then
tc qdisc del dev lo root