Skip to content

Instantly share code, notes, and snippets.

@andreydelpozo2
andreydelpozo2 / gist:4ea9d84857d370e0577e522b201116ae
Created January 12, 2025 23:56 — forked from rxaviers/gist:7360908
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:
@andreydelpozo2
andreydelpozo2 / recover_source_code.md
Created March 12, 2017 18:19 — forked from simonw/recover_source_code.md
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
#include <Windows.h>
#include <TlHelp32.h>
#include <Psapi.h>
int main()
{
const auto *exe = "GuiltyGearXrd.exe";
const auto *dll = "ggxrd_hitbox_overlay.dll";
const auto snap = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
#include <stdexcept>
#include <cmath>
#include <vector>
#include <Windows.h>
#include <Psapi.h>
#include <detours.h>
#include <d3d9.h>
#include <d3dx9.h>
#define PI 3.14159F
@andreydelpozo2
andreydelpozo2 / foo.log
Created February 16, 2017 05:14 — forked from ibeex/foo.log
Flask logging example
A warning occurred (42 apples)
An error occurred
@andreydelpozo2
andreydelpozo2 / gist:4077a72e96971e5bbcd3
Created September 14, 2015 21:09
fix brew in elCap
cd `brew --prefix`
git remote add origin https://github.com/mxcl/homebrew.git
git fetch origin
git reset --hard origin/master

Install Python

$ brew install readline sqlite gdbm
$ brew install python --universal --framework
$ python --version
Python 2.7

Symlinks...

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname