Skip to content

Instantly share code, notes, and snippets.

View ConorOBrien-Foxx's full-sized avatar

Conor O'Brien ConorOBrien-Foxx

View GitHub Profile
@jlbruno
jlbruno / ordinal.js
Last active July 28, 2022 14:58
Javascript Ordinal Numbers
// found here http://forums.shopify.com/categories/2/posts/29259
var getOrdinal = function(n) {
var s=["th","st","nd","rd"],
v=n%100;
return n+(s[(v-20)%10]||s[v]||s[0]);
}
@spudbean
spudbean / gist:1558257
Last active July 18, 2024 20:15
Look of disapproval and other emoticons
ಠ_ಠ
( ͡° ͜ʖ ͡°)
¯\_(ツ)_/¯
(╯°□°)╯︵ ┻━┻
http://www.fileformat.info/convert/text/upside-down.htm
WRTTN http://wrttn.me/30dbfd/
Unicode Emoticons
@asabaylus
asabaylus / gist:3071099
Created July 8, 2012 14:12
Github Markdown Heading Anchors

Anchors in Markdown

To create an anchor to a heading in github flavored markdown. Add - characters between each word in the heading and wrap the value in parens (#some-markdown-heading) so your link should look like so:

[create an anchor](#anchors-in-markdown)

@orlp
orlp / ipow.c
Last active November 15, 2024 18:29
int64_t ipow(int64_t base, uint8_t exp) {
static const uint8_t highest_bit_set[] = {
0, 1, 2, 2, 3, 3, 3, 3,
4, 4, 4, 4, 4, 4, 4, 4,
5, 5, 5, 5, 5, 5, 5, 5,
5, 5, 5, 5, 5, 5, 5, 5,
6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 6,
6, 6, 6, 6, 6, 6, 6, 255, // anything past 63 is a guaranteed overflow with base > 1
anonymous
anonymous / fish.py
Created August 30, 2013 17:41
><> python interpreter.
#!/usr/local/bin/python3.2
"""
Python interpreter for the esoteric language ><> (pronounced /ˈfɪʃ/).
Usage: ./fish.py --help
More information: http://esolangs.org/wiki/Fish
Requires python 2.7/3.2 or higher.
@jeffThompson
jeffThompson / Words In The Periodic Table: Results
Created December 4, 2013 15:15
A (partial but pretty extensive) list of words that can be made from the elements in the periodic table.
Ac
AcCePt
AcCePtS
AcCEsS
AcCEsSeS
AcCrUAl
AcCRuAl
AcCrUAlS
AcCRuAlS
AcCrUEs
@seiyria
seiyria / README.md
Last active June 18, 2022 18:00
Common Pitfalls in JS-based Games

update: this post has been moved to my blog

Welcome! You might be reading this out of curiosity, or because you want to improve your programming capabilities to stop people from exploiting your JS games. Given that the first thing I do when I open a new incremental is open the terminal and start messing around with your games, I figured it's about time to write something about what I see and how I break your games. Consequently, I'll describe ways you can protect your games from the basic code manipulations I perform. Some might say "you're just ruining the game for yourself!" while I'm going to turn around and say "I don't care" -- that's not the point of this!

NB: This will only apply to vanilla JS applications, which I see more commonly. Frameworks like AngularJS and such are out of scope for this post. Advanced techniques such as using a debugger, while slightly more on topic, will also be disregarded for now.

Le

@npocmaka
npocmaka / pipeLimit.bat
Created May 11, 2015 08:58
Demonstrates the limit of the max number of consecutive pipes.
@echo off
echo|(
set /p=z)|(
set /p=z)|(
set /p=z)|(
set /p=z)|(
@ConorOBrien-Foxx
ConorOBrien-Foxx / WeArePPCG.js
Last active February 6, 2022 06:57
A userscript to redesign the PPCG website
// ==UserScript==
// @name favicon
// @namespace Cᴏɴᴏʀ O'Bʀɪᴇɴ
// @version 1
// @grant none
// ==/UserScript==
function qS(x){
return document.querySelector(x);
}
@vihanb
vihanb / testcases
Last active January 23, 2016 18:04
Header Parsing Challenge Test Cases
Pyth - <h2>Pyth, <s>40</s> <s>36</s> <s>34</s> 32 bytes</h2>
Ruby - <h2>Ruby (2.2.2p95), 124 bytes</h2>
TeaScript - <h1><a href="https://esolangs.org/wiki/TeaScript" rel="nofollow">TeaScript</a>, 16 bytes</h1>
Bash - <h1>Bash</h1>
Jelly - <h1>Jelly, 29 bytes</h1>
Pyth - <h2>Pyth, 17 bytes</h2>
JavaScript - <h1>JavaScript, 131238 - 10 = 131228 bytes</h1>
Vitsy - <h1>Vitsy, 40 bytes</h1>
Java - <h2>Java, 81 bytes</h2>
Brainf*ck - <h1>Brainf*ck, <s>489</s> 466 characters</h1>