Skip to content

Instantly share code, notes, and snippets.

View eczn's full-sized avatar
Star

eczn* eczn

Star
View GitHub Profile
@rxaviers
rxaviers / gist:7360908
Last active June 9, 2024 11:52
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:
; ___ _ __ ___ __ ___
; / __|_ _ __ _| |_____ / /| __|/ \_ )
; \__ \ ' \/ _` | / / -_) _ \__ \ () / /
; |___/_||_\__,_|_\_\___\___/___/\__/___|
; An annotated version of the snake example from Nick Morgan's 6502 assembly tutorial
; on http://skilldrick.github.io/easy6502/ that I created as an exercise for myself
; to learn a little bit about assembly. I **think** I understood everything, but I may
; also be completely wrong :-)
@totherik
totherik / gist:3a4432f26eea1224ceeb
Last active June 7, 2024 16:18
v8 --allow-natives-syntax RuntimeFunctions
Per https://code.google.com/p/v8/codesearch#v8/trunk/src/runtime.cc
%CreateSymbol
%CreatePrivateSymbol
%CreateGlobalPrivateSymbol
%NewSymbolWrapper
%SymbolDescription
%SymbolRegistry
%SymbolIsPrivate
@bcobb
bcobb / cons-car-cdr.swift
Last active June 18, 2021 12:18
SICP cons/car/cdr in Swift
enum ConsPosition {
case Left, Right
}
func cons<T>(a: T, b: T) -> (ConsPosition -> T) {
func innerCons(i: ConsPosition) -> T {
if i == .Left {
return a;
} else {
return b;
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@callumlocke
callumlocke / scale-canvas.ts
Last active June 8, 2024 04:49
How to fix a canvas so it will look good on retina/high-DPI screens.
/*
UPDATED for 2023 - Now much simpler. The old tricks are no longer needed.
The following code makes an 800×600 canvas that is always as sharp as possible for the device.
You still draw on it as if it's the logical size (800×600 in this case), but everything just
looks sharper on high-DPI screens. Regular non-sharp screens are not affected.
*/
const width = 800
@lomomike
lomomike / gist:770dd7df03bb951fac4e
Created October 24, 2015 19:26
Simple kernel module
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/slab.h>
struct birthday {
int day;
int month;
int year;
@kisenka
kisenka / inmemory-webpack-compiler.js
Last active April 15, 2023 15:09
Webpack in-memory filesystem
var webpack = require('webpack');
var MemoryFS = require('memory-fs');
var SingleEntryDependency = require('webpack/lib/dependencies/SingleEntryDependency');
var fs = new MemoryFS();
fs.mkdirpSync('/src');
fs.writeFileSync('/src/app.js', 'require("./dep.js")', 'utf-8');
fs.writeFileSync('/src/dep.js', 'module.exports = function(msg){console.log(msg)}', 'utf-8');
fs.writeFileSync('/src/extra-entry.js', 'require("./dep.js")', 'utf-8');

Aligning images

This is a guide for aligning images.

See the full Advanced Markdown doc for more tips and tricks

left alignment

@navix
navix / readme.md
Last active August 4, 2023 09:02
TypeScript Deep Partial Interface

TypeScript Deep Partial Interface

export type DeepPartial<T> = T extends Function ? T : (T extends object ? { [P in keyof T]?: DeepPartial<T[P]>; } : T);

Before typescript@3.1

type DeepPartial = {