Skip to content

Instantly share code, notes, and snippets.

View tomlin7's full-sized avatar
🌐
uni

billy tomlin7

🌐
uni
View GitHub Profile
@bollwyvl
bollwyvl / LetMeGoogleThatForYou2.js
Created July 10, 2009 03:42
A Ubiquity 0.5+ command for Let Me Google That For You
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Parser 2 API version of the LetMeGoogleThatForYou *
* Ubiquity script compatible with Ubiquity 0.5+. *
* The Legacy parser version is available at *
* http://gist.github.com/45201 *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
var icon = "http://letmegooglethatforyou.com/favicon.ico";
var tu_desc = "<a href=\"http://www.tinyurl.com\">TinyUrl</a>";
var lmg_desc = "<a href=\"http://lmgtfy.com\">Let Me Google That For You</a>";
@msimpson
msimpson / cfire
Created July 21, 2011 10:51
Curses based ASCII art fire animation.
#!/usr/bin/python
import curses, random
screen = curses.initscr()
width = screen.getmaxyx()[1]
height = screen.getmaxyx()[0]
size = width*height
char = [" ", ".", ":", "^", "*", "x", "s", "S", "#", "$"]
b = []
@keeguon
keeguon / countries.json
Created April 5, 2012 11:11
A list of countries in JSON
[
{name: 'Afghanistan', code: 'AF'},
{name: 'Åland Islands', code: 'AX'},
{name: 'Albania', code: 'AL'},
{name: 'Algeria', code: 'DZ'},
{name: 'American Samoa', code: 'AS'},
{name: 'AndorrA', code: 'AD'},
{name: 'Angola', code: 'AO'},
{name: 'Anguilla', code: 'AI'},
{name: 'Antarctica', code: 'AQ'},
@FiloSottile
FiloSottile / 32.asm
Last active May 16, 2024 19:56
NASM Hello World for x86 and x86_64 Intel Mac OS X (get yourself an updated nasm with brew)
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32
global start
section .text
start:
push dword msg.len
push dword msg
push dword 1
mov eax, 4
@hawkw
hawkw / HawkLang.md
Last active September 25, 2023 12:38
Random ideas for Programming Language Syntax I'd Like To See. Using Python syntax highlighting for the code snippets because some syntax is similar enough that python-style highlighting improves readability.

Thoughts and Rationale

This isn't a comprehensive language design, it's just ideas for syntactical constructs I'd really like to see some day. It'd probably be some kind of object/functional hybrid a la Scala - I really like the recent trend of "post-functional" languages that take a lot of ideas/influence from functional programming, but aren't fascist about it, or so scary that only math Ph.Ds can learn them. The idea is to fuse OOP and FP into a language which gives you a high level of expressiveness and power, but is actually useable for Getting Real Things Done.

@programmingthomas
programmingthomas / mandelbrot.cl
Last active July 15, 2021 12:20
Mandelbrot kernel
//mandelbrot.cl
const sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE | CLK_FILTER_NEAREST;
kernel void mandelbrot(write_only image2d_t output, float width, float height, int iter) {
size_t x = get_global_id(0);
size_t y = get_global_id(1);
float2 z, c;
background (46, 46, 46)
comment grey (121, 121, 121)
white (214, 214, 214)
yellow (229, 181, 103)
green (180, 210, 115)
orange (232, 125, 62)
purple (158, 134, 200)
pink (176, 82, 121)
blue (108, 153, 187)
@whoshuu
whoshuu / curlget.cpp
Created March 31, 2015 06:44
Example libcurl GET request
#include <curl/curl.h>
#include <string>
size_t writeFunction(void *ptr, size_t size, size_t nmemb, std::string* data) {
data->append((char*) ptr, size * nmemb);
return size * nmemb;
}
int main(int argc, char** argv) {
auto curl = curl_easy_init();
@parmentf
parmentf / GitCommitEmoji.md
Last active July 2, 2024 14:30
Git Commit message Emoji
@Rapptz
Rapptz / custom_commands.py
Last active October 28, 2022 14:42
Showing off custom commands using discord.ext
import discord
from discord.ext import commands
import json, inspect
import functools
import re
# some JSON set up for our storage because >lazy<
class CustomCommandEntry:
__slots__ = ['name', 'content', 'guild_id']