Skip to content

Instantly share code, notes, and snippets.

View csprance's full-sized avatar
🐝

Chris Sprance csprance

🐝
View GitHub Profile
/**
* Name: rconUtils
* Created by chris on 4/26/2017.
* Description: Sends a command to a Miscreated server and parses the response
* // RCON Steps
* --- 1 ---
* // Request: challenge
* // Response: uptime
* --- 2 ---
* // Request: md5(uptime:password)
@csprance
csprance / get_miscreated_servers.js
Created February 5, 2018 01:18
Gets data about miscreated servers from the steam master server
import vmsq from 'vmsq';
import SourceQuery from 'sourcequery';
const MASTER_SERVER = 'hl2master.steampowered.com:27011';
export const getServer = (servers = []) => {
return new Promise((resolve, reject) => {
vmsq(MASTER_SERVER, vmsq.ALL, {
appid: 299740
})
<?php
// Return JSON
header('Content-Type: application/json');
error_reporting(0);
// Cache
require_once 'vendor/autoload.php';
$longcache = new Gilbitron\Util\SimpleCache();
$longcache->cache_path = 'cache/';
$longcache->cache_time = 3600;
"""
===================================
Shaded & power normalized rendering
===================================
The Mandelbrot set rendering can be improved by using a normalized recount
associated with a power normalized colormap (gamma=0.3). Rendering can be
further enhanced thanks to shading.
The `maxiter` gives the precision of the computation. `maxiter=200` should
"""
@name: cryengine_setup.py
@author: Chris Sprance
@project: Miscreated
@description: Sets up an fbx from modo to be ready to export in maya
@instructions: Select top level group(s) hit button. fist bump
"""
import re
import maya.mel as mm
@csprance
csprance / johnny-five-morse-code.ts
Last active December 8, 2018 18:00
Morse Code Arduino
import five, { Button } from 'johnny-five';
const alpha: { [k: string]: string } = {
'.-': 'A',
'-...': 'B',
'-.-.': 'C',
'-..': 'D',
'.': 'E',
'..-.': 'F',
'--.': 'G',
@csprance
csprance / bad-words.ts
Created November 7, 2018 19:30
bad-words-list
export default [
'reallyReallyBadTestWord',
'5h1t',
'5hit',
'anal',
'ar5e',
'ass',
'ass-fucker',
'asses',
'assfucker',
@csprance
csprance / README.md
Created January 27, 2019 04:46
SCRIPT-8
@csprance
csprance / get_selected_clip.py
Created February 18, 2019 02:23
Get selected clip path in modo
import modo
import lx
def get_selected_clip_filepath():
scene = modo.Scene()
[clip] = scene.selectedByType(lx.symbol.sITYPE_VIDEOSTILL)
filepath = clip.channel("filename").get()
return filepath
@csprance
csprance / Gdal2Tiles.md
Last active May 9, 2019 16:30
GDAL2Tiles Instructions