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
%% Erlang Programming, exercise 4-2 | |
%% | |
%% A variant where the message is passed M times around. | |
%% | |
-module (ring). | |
-compile(export_all). | |
%% N processes in a ring pass around Message a total of M times. | |
start(N, Message, M) -> |
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 -e | |
ARCH_VERSION="2014.12.01" | |
ARCH_FILE="archlinux-bootstrap-$ARCH_VERSION-x86_64.tar.gz" | |
ARCH_BOOTSTRAP="http://archlinux.mirrors.ovh.net/archlinux/iso/$ARCH_VERSION/$ARCH_FILE" | |
ARCH_SUMS="http://archlinux.mirrors.ovh.net/archlinux/iso/$ARCH_VERSION/sha1sums.txt" | |
# download bootstrap image | |
cd /tmp | |
wget $ARCH_BOOTSTRAP |
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
jwa ~> dig A ju.io | |
; <<>> DiG 9.8.3-P1 <<>> A ju.io | |
;; global options: +cmd | |
;; Got answer: | |
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39104 | |
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0 | |
;; QUESTION SECTION: | |
;ju.io. IN A |
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
INT_BYTES = 8 # but note that javascript only does 2^53 | |
int2bytes = (x) -> | |
if x > Number.MAX_SAFE_INTEGER | |
throw new Error "Number is larger than Number.MAX_SAFE_INTEGER (2⁵³-1)!" | |
bytes = [] | |
i = INT_BYTES | |
loop | |
bytes[--i] = x & 0xff |
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
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
from django.db import models, migrations | |
class Migration(migrations.Migration): | |
dependencies = [ | |
('offers', '0001_initial'), |
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
def tadastaffregister(request): | |
if request.method == "POST": | |
start_date = request.POST['start_date'] | |
end_date = request.POST['end_date'] | |
result = [] | |
date = 0 | |
staff_member = [] | |
staff = [] | |
list_item = [] | |
total = 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 node | |
'use strict'; | |
var size = 10000; | |
var sides = 1000000; | |
var padding = 50; | |
var path = polygon(size / 2 + padding, size / 2 + padding, size / 2, sides) | |
.map(function (p) { return p.x + ',' + p.y; }) | |
.join(' '); |
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 node | |
/* | |
* Bullshit Bingo Bot. | |
* 1) Fix the configuration to your liking and run | |
* 2) Use "!bullshit" and the word you want on the pile | |
* 3) ???? | |
* 4) BINGO! | |
* | |
* Send complaints, cheques or anthrax to privacymyass@gmail.com. |
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 | |
spl_autoload_register(function($class) | |
{ | |
$path = str_replace('\\', DIRECTORY_SEPARATOR, $class); | |
// Convert the PascalCased names to snake_case | |
$path = preg_replace('/([a-z])([A-Z](?![A-Z]))/', '$1_$2', $path); | |
$path = strtolower($path); | |
$path = LIB_PATH . '/' . $path . '.php'; |
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 | |
namespace Feature\Testing\Annotations; | |
/* * | |
* This script does not yet belong to the FLOW3 framework. * | |
* * | |
* It is free software; you can redistribute it and/or modify it under * | |
* the terms of the GNU Lesser General Public License, either version 3 * | |
* of the License, or (at your option) any later version. * | |
* * |
OlderNewer