Skip to content

Instantly share code, notes, and snippets.

View UltiRequiem's full-sized avatar

Eliaz Bobadilla UltiRequiem

View GitHub Profile
@Ricket
Ricket / brainfucc.c
Created April 24, 2011 16:47
Brainfuck to C translator
/*
* A simple, non-optimizing brainfuck to C translator.
* 2010-08-31 - Version 1.0 (Cory Burgett)
*
* This code is hereby placed into the public domain.
*
* Originally located at: http://www4.ncsu.edu/~cmburget/brainfucc.c
*/
#include <stdio.h>
@espeed
espeed / setup.sh
Created May 6, 2012 15:13
Create and deploy a Python/Flask "hello world" app on Heroku.
#!/bin/bash
# Create and deploy a Python/Flask "hello world" app on Heroku.
# by James Thornton, http://jamesthornton.com
# To run it, do:
# $ heroku login
# $ bash setup.sh helloworld
# $ cd helloworld
@rxaviers
rxaviers / gist:7360908
Last active May 4, 2024 22:00
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@eirikb
eirikb / imgur-oauth-test.html
Last active March 6, 2024 14:21
Post to imgur using oauth (api v3) on a static (no server) site
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>imgur oauth</title>
<script src="http://code.jquery.com/jquery.min.js"></script>
<script>
$(function () {
var extractToken = function(hash) {
@simonista
simonista / .vimrc
Last active May 1, 2024 19:47
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
@0atman
0atman / set-gnome-shell-hotkeys.sh
Created September 29, 2014 10:19
i3 gnome-shell keyboard bindings
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1 "['<alt>1']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-2 "['<alt>2']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-3 "['<alt>3']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-4 "['<alt>4']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-1 "['<alt><shift>1']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-2 "['<alt><shift>2']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-3 "['<alt><shift>3']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-4 "['<alt><shift>4']"
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@benjamingr
benjamingr / gist:0237932cee84712951a2
Last active October 6, 2023 08:31
Promise unhandled rejection tracking global handler hook

Possibly Unhandled Rejection NodeJS Promise Hook

###Unhandled Rejection Tracking

Several promise libraries such as bluebird and when as well as some native promise implementations offer potentially unhandled rejection tracking. This means that the following:

Promise.reject(new Error("err")); // never attach a `catch`
@mtolly
mtolly / Adder.hs
Created July 29, 2015 01:22
Small example of compiling a Haskell Mac .dylib to be used from C
{-# LANGUAGE ForeignFunctionInterface #-}
module Adder where
import Foreign.C
adder :: CInt -> CInt -> IO CInt
adder x y = return $ x + y
foreign export ccall adder :: CInt -> CInt -> IO CInt