Skip to content

Instantly share code, notes, and snippets.

View zengjie's full-sized avatar

zengjie zengjie

  • Vertex Games
  • Singapore
View GitHub Profile
@rgreenjr
rgreenjr / postgres_queries_and_commands.sql
Last active November 14, 2024 09:13
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@dcoles
dcoles / inline.py
Created November 14, 2012 09:13
Inline assembly in Python
import ctypes
import sys
import os
import errno
FUNC = ctypes.CFUNCTYPE(None)
PROT_NONE = 0
PROT_READ = 1
PROT_WRITE = 2
@boodle
boodle / Making Apple Developer certificates on Linux.md
Last active August 16, 2024 19:23
Making Apple Developer certificates on Linux
  1. Create a new directory;
mkdir Apple\ Enterprise
cd Apple\ Enterprise
  1. Generate a certificate signing request
openssl req -nodes -newkey rsa:2048 -keyout ios_enterprise.key -out CertificateSigningRequest.certSigningRequest
@anissen
anissen / Main.hx
Last active March 26, 2016 16:53
Luxe kitchen sink test
import luxe.Component;
import luxe.Input;
import luxe.Parcel;
import luxe.ParcelProgress;
import luxe.Rectangle;
import luxe.Sprite;
import luxe.Color;
import luxe.tween.easing.*;
import luxe.Text;

Git Cheat Sheet

Commands

Getting Started

git init

or

@larsiusprime
larsiusprime / PakLibrary.hx
Last active October 25, 2021 07:25
Pak & Unpack system
package;
import haxe.io.Bytes;
import lime.utils.UInt8Array;
import lime.graphics.Image;
import lime.graphics.ImageBuffer;
import openfl.Assets.AssetLibrary;
import openfl.Assets;
import openfl.Lib;
import openfl.utils.ByteArray;
@lewislepton
lewislepton / haxe.json
Last active May 20, 2020 13:13
snippets to use inside Kode Studio
{
/*
KHA/HAXE SNIPPETS
Lewis Lepton
https://lewislepton.com
*/
"new function": {
"prefix": "function",
"body": [
"public function ${NAME}(){",

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@aparrish
aparrish / understanding-word-vectors.ipynb
Last active November 9, 2024 12:16
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@enricofoltran
enricofoltran / main.go
Last active October 3, 2024 14:08
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
package main
import (
"context"
"flag"
"fmt"
"log"
"net/http"
"os"
"os/signal"