Skip to content

Instantly share code, notes, and snippets.

View vinjn's full-sized avatar

Jing Zhang vinjn

View GitHub Profile
@paulhoux
paulhoux / CanvasUi.h
Created February 11, 2017 13:46
CanvasUi: a simple 2D modifier tool to drag and zoom your work area. Made for Cinder.
/*
Copyright (c) 2016, Paul Houx - All rights reserved.
This code is intended for use with the Cinder C++ library: http://libcinder.org
Redistribution and use in source and binary forms, with or without modification, are permitted provided that
the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and
the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
@cebolan
cebolan / darknet53.cfg
Created June 12, 2018 04:53
Darknet53 classification model
[net]
# Training
# batch=128
# subdivisions=2
# Testing
batch=1
subdivisions=1
height=256
@asus4
asus4 / websocket_osc_bridge.py
Created December 18, 2015 05:36
WebSocket to OSC bridge
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import json
from pyOSC import OSC
from SimpleWebSocketServer import WebSocket, SimpleWebSocketServer
# arguments
@capntrips
capntrips / Inject.cpp
Last active October 11, 2021 10:46 — forked from robert-nix/Inject.cpp
Unity 2017.1.2p4 type information
// A quick and dirty DLL injector
// This method relies on static linkage and the fact that kernel32 doesn't move
// Compile with the same bitness as the target and the dll.
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <Psapi.h>
#include <stdio.h>
int GetPid(char *modName)
{
@powershell -NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin
rem choco install visualstudio2013professional %1 -y
rem choco install visualstudio2015professional %1 -y
rem choco install teamviewer9 %1 -y
chocolatey install paint.net %1 -y
chocolatey install tortoisegit %1 -y
chocolatey install tortoisesvn %1 -y
chocolatey install autodesk-fusion360 %1 -y
chocolatey install f.lux %1 -y
chocolatey install sysinternals %1 -y
@kachayev
kachayev / topological.py
Last active December 30, 2022 10:21
Topological sort with Python (using DFS and gray/black colors)
# Simple:
# a --> b
# --> c --> d
# --> d
graph1 = {
"a": ["b", "c", "d"],
"b": [],
"c": ["d"],
"d": []
}
@bjhess
bjhess / st_cheat.txt
Created January 11, 2012 21:39
Sublime Text Cheatsheet
Navigation:
cmd-p Goto Anything ('@' for functions, ':' for line number)
cmd-r Function finder
ctl-g Goto line number
cmd-sft-p Command palette
cmd-sft-f Find in Files
cmd-opt-r Toggle regex when finding
cmd-opt-# Columns
ctr-# Switch columns
@ocornut
ocornut / printf_tips.cpp
Last active March 24, 2023 11:23
C/C++ tips for using printf-style functions
// C/C++ tips for using printf-style functions
// Lots of manipulation can be expressed simply and fast with printf-style formatting
// Also helps reducing the number of temporaries, memory allocations or copies
// ( If you are looking for a simple C++ string class that is printf-friendly and not heap-abusive,
// I've been using this one: https://github.com/ocornut/Str )
// If you are interested in a FASTER implementation of sprintf functions, see stb_sprintf.h
// https://github.com/nothings/stb/blob/master/stb_sprintf.h
// How to concatenate non-zero terminated strings
@bblanchon
bblanchon / settings.json
Created February 9, 2016 10:28
Sublime Text: Restore Quick Switch Project shortcut
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" }
// ==UserScript==
// @name sketchfab2obj
// @description Save Sketchfab models as obj
// @author <anonimus>
//
// Version Number
// @version 1.62
//
// Urls process this user script on
// @include /^https?://(www\.)?sketchfab\.com/models/.*