Skip to content

Instantly share code, notes, and snippets.

@primaryobjects
primaryobjects / problem-grammar.txt
Created January 27, 2015 04:59
PEGjs grammar for parsing a PDDL STRIPS domain problem.
/*
pegjs grammar for parsing a PDDL STRIPS domain problem. Example problem:
(define (problem random-pbl1)
(:domain random-domain)
(:init
(S B B) (S C B) (S A C)
(R B B) (R C B))
(:goal (and (S A A))))
*/
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@Ayms
Ayms / gist:077b114a27450f773939
Last active May 30, 2021 17:30
Monitoring and blocking the bittorrent monitoring spies

##Target

Protecting the privacy of the bittorrent users and protecting them from the monitoring spies making their activity much less visible by changing the way they connect to a torrent and setting a method to establish dynamic blocklists and maintain them.

##Abstract

Previous research has focused mainly on discovering monitors using trackers, this study focuses on tracking and blocking the monitors using the bittorrent peers and content discovery system only (called the DHT).

The global result is that the spies are organized to monitor automatically whatever exists in the bittorrent network, they are easy to find but difficult to follow since they might change their IP addresses and are polluting the DHT.

@kellective
kellective / poem-journey-of-the-void.txt
Created September 9, 2014 10:19
Journey of the void - Ben Goertzel
This is a snippit of a long text from 'The Journey of the Void' - Ben Goertzel
Who am I, a mere conglomeration of particles --
an organism flashing in and out of existence --
a web of learned and inherited patterns --
to explain the universe as a whole?
And yet,
@mathisonian
mathisonian / index.md
Last active March 22, 2023 05:31
requiring npm modules in the browser console

demo gif

The final result: require() any module on npm in your browser console with browserify

This article is written to explain how the above gif works in the chrome (and other) browser consoles. A quick disclaimer: this whole thing is a huge hack, it shouldn't be used for anything seriously, and there are probably much better ways of accomplishing the same.

Update: There are much better ways of accomplishing the same, and the script has been updated to use a much simpler method pulling directly from browserify-cdn. See this thread for details: mathisonian/requirify#5

inspiration

@grugq
grugq / gist:03167bed45e774551155
Last active April 6, 2024 10:12
operational pgp - draft

Operational PGP

This is a guide on how to email securely.

There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.

@castano
castano / hemicube.cpp
Created June 20, 2014 09:46
Hemicube Integrator
#include "hemicube.h"
#define PACK_HEMICUBES 1
static void get_hemicube_face_normal(int index, Vector3 *forward, Vector3 *left, Vector3 *up) {
// Unwrapped hemicube with positive-Z in the middle.
switch (index) {
case 0: *forward = Vector3(+1, 0, 0); *left = Vector3( 0, 1, 0); break;
@rubo77
rubo77 / rotate-screen.sh
Last active October 9, 2023 11:30
This script rotates the screen and touchscreen input, disables or enbles the touchpad, and dis- or enables the virtual keyboard on a Lenovo Yoga 13 or Yoga 2 Pro (source: http://askubuntu.com/q/405628/34298)
#!/bin/bash
# This script rotates the screen and touchscreen input 90 degrees each time it is called,
# also disables the touchpad, and enables the virtual keyboard accordingly
# by Ruben Barkow: https://gist.github.com/rubo77/daa262e0229f6e398766
#### configuration
# find your Touchscreen and Touchpad device with `xinput`
TouchscreenDevice='ELAN Touchscreen'
TouchpadDevice='SynPS/2 Synaptics TouchPad'
@sergejmueller
sergejmueller / ttf2woff2.md
Last active March 9, 2024 13:37
WOFF 2.0 – Learn more about the next generation Web Font Format and convert TTF to WOFF2
@kyledrake
kyledrake / ferengi-plan.txt
Last active April 6, 2024 00:30
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {