Skip to content

Instantly share code, notes, and snippets.

View marsam's full-sized avatar
🇵🇸
From the river to the sea, Palestine will be free 🇵🇸

Mario Rodas marsam

🇵🇸
From the river to the sea, Palestine will be free 🇵🇸
View GitHub Profile
{-
Inspired by Jan Malakhovski (2012) “Reinventing formal logic”
http://oxij.org/note/ReinventingFormalLogic
-}
module HilbertGentzenIPC where
open import Data.Product using (Σ) renaming (_,_ to _∙_)
@rvl
rvl / test-docker.nix
Last active September 28, 2020 23:22
Examples of using nixpkgs PR 11156 https://github.com/NixOS/nixpkgs/pull/11156
# How to build docker images (NIX_PATH and hydra cache required when building off master branch)
# export NIX_PATH=$HOME/dev
# nix-build --option extra-binary-caches http://hydra.nixos.org/ test-docker.nix | xargs -n1 docker load -i
with import <nixpkgs> {};
rec {
# 1. basic example
bash = dockerTools.buildImage {
name = "bash";
@mnot
mnot / snowden-ietf93.md
Last active September 12, 2023 13:40
Transcript of Edward Snowden's comments at IETF93.
@aras-p
aras-p / preprocessor_fun.h
Last active May 8, 2024 06:45
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@quchen
quchen / trolling_haskell
Last active February 24, 2024 01:30
Trolling #haskell
13:15 <xQuasar> | HASKELL IS FOR FUCKIN FAGGOTS. YOU'RE ALL A BUNCH OF
| FUCKIN PUSSIES
13:15 <xQuasar> | JAVASCRIPT FOR LIFE FAGS
13:16 <luite> | hello
13:16 <ChongLi> | somebody has a mental illness!
13:16 <merijn> | Wow...I suddenly see the error of my ways and feel
| compelled to write Node.js!
13:16 <genisage> | hi
13:16 <luite> | you might be pleased to learn that you can compile
| haskell to javascript now

Where people struggle learning Django

Over the last 3 years or so I've helped a bunch of companies, small and large, switch to Django. As part of that, I've done a lot of teaching Django (and Python) to people new to the platform (and language). I'd estimate I've trained something around 200-250 people so far. These aren't people new to programming — indeed, almost all of them are were currently employed as software developers — but they were new to Python, or to Django, or to web development, or all three.

In doing so, I've observed some patterns about what works and what doesn't. Many (most) of the failings have been my own pedagogical failings, but as I've honed my coursework and my skill I'm seeing, time and again, certain ways that Django makes itself difficult to certain groups of users.

This document is my attempt at organizing some notes around what ways different groups struggle. It's not particularly actionable — I'm not making any arguments about what Django should or shouldn't do (at least

@arvearve
arvearve / gist:4158578
Created November 28, 2012 02:01
Mathematics: What do grad students in math do all day?

Mathematics: What do grad students in math do all day?

by Yasha Berchenko-Kogan

A lot of math grad school is reading books and papers and trying to understand what's going on. The difficulty is that reading math is not like reading a mystery thriller, and it's not even like reading a history book or a New York Times article.

The main issue is that, by the time you get to the frontiers of math, the words to describe the concepts don't really exist yet. Communicating these ideas is a bit like trying to explain a vacuum cleaner to someone who has never seen one, except you're only allowed to use words that are four letters long or shorter.

What can you say?

@jpetazzo
jpetazzo / README
Created November 9, 2012 22:37
autobahn websocket on dotCloud
Autobahn on dotCloud!
This code is 99% Autobah example code, 1% dotCloud adaptation.
To test this on dotCloud:
- create a dotCloud account at http://www.dotcloud.com/
(free, no credit card)
- install dotCloud CLI, see http://docs.dotcloud.com/
@teoliphant
teoliphant / life.py
Created August 14, 2012 22:03
Array-oriented version of the game of life
from numpy.random import rand
from numpy import r_, ix_, uint8, roll
import matplotlib.pyplot as plt
import time
size = 200
GRID = (rand(size,size) > 0.75).astype(uint8)
# Rotate indices because the world is round
indx = r_[0:size]
up = roll(indx, -1)
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this: