Skip to content

Instantly share code, notes, and snippets.

@rxaviers
rxaviers / gist:7360908
Last active May 18, 2025 06:30
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:
@jvns
jvns / rust-types.md
Last active October 5, 2021 08:41
Rust type tutorial

I found understanding Rust types really confusing, so I wrote up a small tutorial for myself in an attempt to understand some of them. This is by no means exhaustive. There is a types section in the manual, but it has nowhere near enough examples.

I'm not talking about managed pointers (@) at all. A lot of the difficulty with Rust types is that the language is constantly changing, so this will likely be out of date soon.

First, a few preliminaries: it's easier to play with types if you have a REPL and can interactively check the types of objects. This isn't really possible in Rust, but there are workarounds.

To start out: some help

How to get a Rust REPL

(function(){
var counter = 0;
function flappyai() {
if (ingame && !gameover) {
var next = 0;
var nextx = 10000;
var nexty = 100;
for (var i = 1; i <= 3; i++) {
var tube = $("#tube" + i).get(0).style.left;
tube = Number(tube.substring(0,tube.length-2));
@alyssais
alyssais / httppp.rb
Created October 8, 2014 21:18
HTTP Plays Pokémon!
require 'java'
require 'sinatra'
def keycode(key)
name = "VK_#{key.upcase}"
java.awt.event.KeyEvent.const_get(name)
end
robot = java.awt.Robot.new
@tonymtz
tonymtz / gist:714e73ccb79e21c4fc9c
Created November 15, 2014 00:02
Uninstall XQuartz.app from OSX Yosemite
launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist
sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist
sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.* /Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz
sudo pkgutil --forget org.macosforge.xquartz.pkg
# Log out and log in
@FredericJacobs
FredericJacobs / TrustedSCAPICerts
Created December 17, 2014 09:30
Snapchat Certs (and the Square ones for Snapchat payments)
(
<3082042a 30820312 a0030201 02020438 63def830 0d06092a 864886f7 0d010105 05003081 b4311430 12060355 040a130b 456e7472 7573742e 6e657431 40303e06 0355040b 14377777 772e656e 74727573 742e6e65 742f4350 535f3230 34382069 6e636f72 702e2062 79207265 662e2028 6c696d69 7473206c 6961622e 29312530 23060355 040b131c 28632920 31393939 20456e74 72757374 2e6e6574 204c696d 69746564 31333031 06035504 03132a45 6e747275 73742e6e 65742043 65727469 66696361 74696f6e 20417574 686f7269 74792028 32303438 29301e17 0d393931 32323431 37353035 315a170d 32393037 32343134 31353132 5a3081b4 31143012 06035504 0a130b45 6e747275 73742e6e 65743140 303e0603 55040b14 37777777 2e656e74 72757374 2e6e6574 2f435053 5f323034 3820696e 636f7270 2e206279 20726566 2e20286c 696d6974 73206c69 61622e29 31253023 06035504 0b131c28 63292031 39393920 456e7472 7573742e 6e657420 4c696d69 74656431 33303106 03550403 132a456e 74727573 742e6e65 74204365 72746966 69636174 696f6e20 41757468 6f726974 79202832 30343829 30820122 300d0609 2a864886 f70d0101 01050003 820
@sfan5
sfan5 / image2xterm.py
Last active July 13, 2020 18:24
Converts images into color sequences (xterm-256color)
#!/usr/bin/env python3
import sys
import getopt
from PIL import Image
xterm256colors = [ # http://pln.jonas.me/xterm-colors
(0, (0x00, 0x00, 0x00)), # SYSTEM
(1, (0x80, 0x00, 0x00)), # SYSTEM
(2, (0x00, 0x80, 0x00)), # SYSTEM
(3, (0x80, 0x80, 0x00)), # SYSTEM
/System/Library/AccessibilityBundles/AXSpeechImplementation.bundle/AXSpeechImplementation
/System/Library/AccessibilityBundles/AccessibilitySettingsLoader.bundle/AccessibilitySettingsLoader
/System/Library/AccessibilityBundles/MapKitFramework.axbundle/MapKitFramework
/System/Library/AccessibilityBundles/UIKit.axbundle/UIKit
/System/Library/BulletinBoardPlugins/NanoMailDataProvider.bundle/NanoMailDataProvider
/System/Library/BulletinBoardPlugins/SMSBBPlugin.bundle/SMSBBPlugin
/System/Library/Caches/com.apple.xpc//sdk.dylib
/System/Library/Caches/com.apple.xpcd/xpcd_cache.dylib
/System/Library/CoreServices/Encodings/libArabicConverter.dylib
/System/Library/CoreServices/Encodings/libCyrillicConverter.dylib
@hako
hako / docx2md.md
Created September 28, 2015 15:59 — forked from carloscasalar/docx2md.md
Convert a Word Document into MD

Converting a Word Document to Markdown in One Move

The Problem

A lot of important government documents are created and saved in Microsoft Word (*.docx). But Microsoft Word is a proprietary format, and it's not really useful for presenting documents on the web. So, I wanted to find a way to convert a .docx file into markdown.

Installing Pandoc

On a mac you can use homebrew by running the command brew install pandoc.

The Solution

anonymous
anonymous / GAME_MASTER_v0_1.protobuf
Created July 16, 2016 16:31
Pokemon Go decoded GAME_MASTER protobuf file v0.1
Result: 1
Items {
TemplateId: "BADGE_BATTLE_ATTACK_WON"
Badge {
BadgeType: BADGE_BATTLE_ATTACK_WON
BadgeRanks: 4
Targets: "\nd\350\007"
}
}
Items {