This Article has struck a chord with me. I'm not an Erlang-er, but the style he describes of "writing many tiny functions" strongly reminds me of why I've come to love Factor.
This file contains hidden or 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 xerox, random | |
from flask import Flask, request | |
app = Flask(__name__) | |
@app.route("/crap") | |
def crap(): | |
xerox.copy(random.choice(app.bucket)) | |
return "Copying some randomly chosen crap to your clipboard!" | |
@app.route("/") |
This file contains hidden or 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
FUCKING HELL | |
This shit is fucking broke! | |
_________________________ | |
I am: | |
_ indifferent _ homicidal _ FUCKED | |
This file contains hidden or 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"?> | |
<nil-classes type="array"/> |
This file contains hidden or 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 ConfigParser { | |
function __construct($ini_file) { | |
$this->data = parse_ini_file($ini_file, true); | |
if ($this->data === FALSE) { | |
throw new Exception("Error reading file {$ini_file}"); | |
} | |
} | |
function sections() { |
This file contains hidden or 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 python | |
# Usage: python extract_vulns.py <url> | |
# Bog-simple screen scraping, will fail unless URL is something like this: | |
# http://www.ubuntu.com/usn/lucid/ | |
# http://www.ubuntu.com/usn/lucid/?page=3 | |
# | |
from BeautifulSoup import BeautifulSoup | |
import requests, time, sys |
This file contains hidden or 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
if status --is-login | |
# Use universal variables to replace globals, this lets set -Ux change PATH and LANG forever | |
set -ge PATH | |
set -gx PATH $PATH | |
set -ge LANG | |
set -gx LANG $LANG | |
function e | |
emacsclient -n $argv |
This file contains hidden or 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
USE: peg.ebnf | |
#! throw this in the listener to see the example parse tree | |
"discount_quantity_amount=Discount_Name{repeat|1-5.42|2-5|6-0}" | |
[EBNF | |
number = [0-9]+ => [[ string>number ]] | |
amount = number ("." number)? | |
type = "allunits" | "incremental" | "repeat" | "single" |
This file contains hidden or 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 OLD AND OUTDATED | |
#### LIKE, ANSIBLE 1.0 OLD. | |
#### | |
#### PROBABLY HIT UP https://docs.ansible.com MY DUDES | |
#### | |
#### IF IT BREAKS I'M JUST SOME GUY WITH | |
#### A DOG, OK, SORRY | |
#### |
This file contains hidden or 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
-- Use this function to perform your initial setup | |
function setup() | |
seed = 1 | |
iparameter("depth", 1, 15) | |
depth = 10 | |
parameter("length", 0, 300) | |
length = 120 | |
parameter("angle", 1, 90) |