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 is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the | |
software to the public domain. We make this dedication for the benefit |
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
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"net/http" | |
"os" | |
) |
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
tee /etc/ipsec.conf << EOF | |
config setup | |
dumpdir=/var/run/pluto/ | |
#in what directory should things started by setup (notably the Pluto daemon) be allowed to dump core? | |
nat_traversal=yes | |
#whether to accept/offer to support NAT (NAPT, also known as "IP Masqurade") workaround for IPsec | |
virtual_private=%v4:10.0.0.0/8,%v4:192.168.0.0/16,%v4:172.16.0.0/12,%v6:fd00::/8,%v6:fe80::/10 | |
#contains the networks that are allowed as subnet= for the remote client. In other words, the address ranges that may live behind a NAT router through which a client connects. |
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
program Fuses; | |
{ | |
The input consists of several test cases. Each test case describes a set of | |
electrical devices and gives a sequence of turn on/off operations for these | |
devices. | |
The input will be terminated by a test case starting with n = m = c = 0. This | |
test case should not be processed. | |
} |
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
brew install $(brew missing | perl -ne 'my @splits = split / /; shift @splits; ; print join(" ", @splits) =~ s/[:\n]/ /gr;') |
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
System.DllNotFoundException | |
SQLite.Interop.dll | |
Description: HTTP 500.Error processing request. | |
Details: Non-web exception. Exception origin (name of application or object): System.Data.SQLite. | |
Exception stack trace: | |
at (wrapper managed-to-native) System.Data.SQLite.UnsafeNativeMethods:sqlite3_config_none (System.Data.SQLite.SQLiteConfigOpsEnum) | |
at System.Data.SQLite.SQLite3.StaticIsInitialized () [0x00000] in <filename unknown>:0 | |
at System.Data.SQLite.SQLiteLog.Initialize () [0x00000] in <filename unknown>:0 | |
at System.Data.SQLite.SQLiteFactory..cctor () [0x00000] in <filename unknown>: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
#!/usr/bin/env php | |
<?php | |
/* | |
.---._----------------------------------+ | |
___________/ ._____) WELCOME TO | | |
) __| the really cool | | |
__| PHP pre-commit hook | | |
..---------.._____| by @ciarand | | |
+---------------------------------+ |
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
$coverage_attrs = option(simplexml_load_file("./app/coverage/coverage.xml")) | |
->map(method("xpath", ["/coverage/project/metrics"])) | |
->reject([]) | |
->map(index(0)) | |
->map(method("attributes")) | |
->get(); |
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 | |
curl -q -H "Authorization: Bearer $AUTH_TOKEN" \ | |
"https://api.app.net/posts/search?creator_id=45708&count=200" > tmp.json | |
while true | |
do | |
MIN_ID=$(jq < tmp.json .meta.min_id | sed -e 's/"//g') | |
jq < tmp.json '.data[].text' | gsed -e 's/^"//' | gsed -e 's/"$//' | gsed -e 's/@\w\+ \?//g' >> ./posts.txt |
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
<?php | |
class FooBar | |
{ | |
public function doThing() | |
{ | |
while (true) { | |
// just render the regular view for non-post reqs | |
if (!Request::isPost()) { | |
break; | |
} |
NewerOlder