Skip to content

Instantly share code, notes, and snippets.

@ojacobson
ojacobson / option-one.pp
Last active December 22, 2015 18:49 — forked from st3fan/gist:6515937
class system-update {
exec { 'apt-get update':
command => 'apt-get update',
path => ['/usr/bin', '/bin', '/usr/sbin', '/sbin'],
}
Exec['apt-get update'] -> Package<| |> # before all packages
$sysPackages = [ "build-essential", "nmap", "skipfish", "curl", "libcurl4-openssl-dev" ]
package { $sysPackages:
void writeFoo(File file, Structure data) throws IOException {
try (OutputStream fout = new FileOutputStream(file)) {
writeHeader(fout); // writeHeader is marked 'throws IOException' and contains no try/catch
writeContent(fout, data); // ditto
}
}
create table if not exists "Products_productindexwords" (
word varchar primary key
);
do $do$
begin
create temporary table words (
tsv tsvector
) on commit drop;
@media (max-width: 767px) {
// cribbed from http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio
// and also #comment-764668376 on that page. Horrifying CSS.
#map-container {
display: inline-block;
position: relative;
}
#map-container:before {
content: "";
e5963c8de50017cb010a71ef52de73d9b2a1742d HEAD
e5963c8de50017cb010a71ef52de73d9b2a1742d refs/heads/master
c0b79fe2f9556eaec3de86ef0633a8cc26aa1359 refs/pull-requests/1/from
437a9c8f9c0653c5cd18c83bbdfbf05376e82b3b refs/pull-requests/1/merge
437a9c8f9c0653c5cd18c83bbdfbf05376e82b3b refs/pull-requests/1/merge-clean
dddc2c2e28d50a4a5b7be6b863420cfbfe084927 refs/pull-requests/1/to
<!DOCTYPE schema SYSTEM "XMLSchema.dtd" [
<!ENTITY % p ''>
<!ENTITY % s ''>
]>
<schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns="http://www.w3.org/2001/XMLSchema">
. /usr/local/git/contrib/completion/git-completion.bash
. "$HOME/Console/git/git-prompt.sh"
GIT_PS1_SHOWDIRTYSTATE=true
GIT_PS1_SHOWUNTRACKEDFILES=true
ps1_status() {
if [ $? -ne 0 ]; then
echo ":("
else
echo ":)"
package com.example.estobhan;
import java.util.Timer;
import java.util.TimerTask;
public class TimerExample {
private static final long PERIOD = 5000;
public static void main(String[] args) {
final Timer timer = new Timer();
@ojacobson
ojacobson / hello.py
Last active December 17, 2015 11:29 — forked from idcmp/hello.py
__author__ = 'idcmp'
import json
def handle_westie_results(results):
print results
dancers = {}
success = 0
class gitolite {
group { 'git':
ensure => present,
system => true,
}
user { 'git':
ensure => present,
system => true,
gid => git,