Skip to content

Instantly share code, notes, and snippets.

Chanting

The Four Dhamma Summaries

1 3 1 3 1 3
The world is swept a- way.
4 3 1 3 2 5

Chanting

Index

  1. Morning
  2. Evening
  3. Reflections
  4. Contemplation of the Body
  5. Refuge
  6. Discourses
@HomenSimpsor
HomenSimpsor / compareOpcodes.sh
Last active August 29, 2015 14:08
Compare opcodes between two different git trees to verify they're the same.
#!/usr/bin/env bash
for fn in `git diff --name-only before master`; do
printf "$fn : "
if [[ -n \
$(diff \
<(php -d vld.active=1 -d vld.execute=0 -f "/home/ryan/s/fr/ui/$fn" 2>/dev/null) \
<(php -d vld.active=1 -d vld.execute=0 -f "/home/ryan/s/fr/ui-alt/$fn" 2>/dev/null) \
) ]]; then
printf "✖\n"
@HomenSimpsor
HomenSimpsor / innocent-input.js
Created October 10, 2014 00:35
Contracts.js compile
import @ from 'contracts.js';
@ (Num) -> Num
function id(x) {
return x;
}

Rule Index

Legend:

  • Pārājika — Rules entailing expulsion from the Sangha (Defeat)
  • Saṅghādisesa — Rules entailing an initial and subsequent meeting of the Sangha
  • Aniyata — Indefinite rules
  • Nissaggiya Pācittiya — Rules entailing forfeiture and confession
  • Pācittiya — Rules entailing confession
  • Pāṭidesanīya — Rules entailing acknowledgement
@HomenSimpsor
HomenSimpsor / pivotal.css
Created August 15, 2014 19:44
Make Pivotal not look like ass
.projector.layouts .deadline,
.projector.layouts .button.finish,
.projector.layouts .selector,
/*.projector.layouts .meta,*/
.projector.layouts .story .preview .post.labels,
.projector.layouts .expander,
.projector.layouts .number,
.projector.layouts .start,
.projector.layouts .reject,
.accepted_stories_bar,
<?php
/*
Function change password in htpasswd.
Arguments:
$user > User name we want to change password to.
$newpass > New password
$type > Type of cryptogrphy: DES, SHA, MD5.
$salt > Option: Add your custom salt (hashing string).
Salt is applied to DES and MD5 and must be in range 0-9A-Za-z
$oldpass > Option: Add more security, user must known old password to change it.
#include <stdio.h>
void subtract(float, float); /* the function prototype */
int main()
{
void MAXCOUNT(float, float); /* the function prototype */
<?php
ini_set('display_errors', 'On');
ini_set('html_errors', 0);
error_reporting(-1);
function ShutdownHandler()
{
if(@is_array($error = @error_get_last()))
{
return(@call_user_func_array('ErrorHandler', $error));
@HomenSimpsor
HomenSimpsor / howMany.js
Created August 23, 2013 20:24
How many letters can be generated from an n-word diceware phrase
function howMany(n) {
var L = Math.pow(7776, n);
var num = Math.log(L);
var den = Math.log(26);
var total = num / den;
//console.log("result", L, num, den, total);
console.log("A diceware phrase of", n, "words will give", total, "letters")
}