Skip to content

Instantly share code, notes, and snippets.

View JonBons's full-sized avatar

JonBons

View GitHub Profile
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active November 11, 2025 10:27
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@vedant
vedant / gist:9333992
Last active September 26, 2024 01:23
Export note files from Google Keep
/* Vedant Misra (vedantmisra.com) (github.com/vedant)
*
* Script for exporting Google Keep note files.
*
* This does not handle attachments or checklists, only note files. Downloads
* each note to a .txt file named for the note's title.
*
* To use this, go to https://drive.google.com/keep/ and wait for the page to
* fully load all of your saved notes; scroll to the bottom to confirm they're
* loaded. Then paste the below in your URI bar, go to the start of the line,
@ThomasJClark
ThomasJClark / build.gradle
Created January 27, 2015 00:50
WPILib grade build
plugins {
id "java"
id 'org.hidetake.ssh' version '0.4.5'
}
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
def wpilibDir = System.env['HOME'] + '/wpilib/java/current'
"foo" | Set-Content helloworld.txt
hg add helloworld.txt
hg commit -m "added helloworld"
(Measure-Command { hg log -G -l 5 }).TotalSeconds
///////// ARMA3 Config CSV EXPORT
///////// Usage: [name,CfgPatches name]
///////// Usage: [name] to export bis stuff
///////// Usage: Paste everything below in the debug console and run it (or exec as script)
///////// ToDo: Filter weapon variants (with sights etc)
private ["_CfgPatches","_configPath","_collectionName","_getClass","_out","_wepsEx","_itemsEx","_magsEx","_backEx","_weapons","_backpacks","_magazines","_glasses","_configName","_picture","_parents","_type","_classname","_mags","_mass","_capacity","_armor","_passthrough","_append","_ammo"];
_CfgPatches = false;
_configPath = "";
@joelcogen
joelcogen / Readme.md
Last active January 16, 2016 12:58
CS:GO
@GeorgeDettmer
GeorgeDettmer / simplePositionPeristenceStoredOnServer.sqf
Last active December 24, 2018 01:32
Example of position persistence using profileNamespace on server
if isServer then { //only run on server
addMissionEventHandler ["HandleDisconnect",{ //add an event to save data on player disconnect
_uids = profileNamespace getVariable ["#MOSES#uids",[]]; //get all uids for players with saved positions
_idx = _uids find _uids; //get the "index" of the uid in the array
if (_idx == -1) then { //if uid not in list
_idx = _uids pushBack _uids; //add it and store new index
profileNamespace setVariable ["#MOSES#uids",_uids]; //set uids again, a new one was added
};
_positions = profileNamespace getVariable ["#MOSES#lastPositions",[]]; //get saved positions
_directions = profileNamespace getVariable ["#MOSES#lastDirections",[]]; //get saved directions
@kscottz
kscottz / opencv_twitch.py
Created February 8, 2016 05:00
A hack to slurp up twitch streams and process them with opencv.
import cv2
import numpy as np
import time
import livestreamer
# use live streamer to figure out the stream info
streams = livestreamer.streams("http://www.twitch.tv/inostupid")
stream = streams['best']
# open our out file.
fname = "test.mpg"
@xeb
xeb / ssh_reverse.md
Last active March 17, 2023 14:48
Reverse SSH

SSH Reverse Proxy

Some simple notes to setup SSH reverse proxy

  1. on source machine (behind the network), run: ssh -N -R 2222:localhost:22 YOURUSER@YOURSERVER

  2. on YOURSERVER, run: ssh -l SOURCEUSER -p 2222 localhost

  3. If you want to automated it, do something like...

type Type =
| String of int
| Guid
| Date
| Bool
| Integer
| Enum of name : string
type Property =
{ Name : string