Skip to content

Instantly share code, notes, and snippets.

View csprance's full-sized avatar
🐝

Chris Sprance csprance

🐝
View GitHub Profile
<?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;
@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
})
@csprance
csprance / MODO11.1.CFG
Created November 16, 2017 22:40
My Modo Setup. Hotkeys, Colors and layout setups as well as user vales. Stick this into %appdata%/Luxology/
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<import>resource:</import>
<import>module:Scripts</import>
<import>user:Configs</import>
<import>configs:</import>
<import>user:Scripts</import>
<import>scripts:</import>
<import>user:Kits</import>
<import>userkits:</import>
@csprance
csprance / textwriter.py
Last active October 20, 2017 19:26
Modo Script to write a bunch of letters
http://www.csprance.com/shots/letters_master.lxo
@csprance
csprance / MiscreatedCVARHelp.md
Last active November 12, 2021 14:11
Miscreated Servers RCON commands and server configuration help

Miscreated Servers

RCON commands and server configuration help

Available Commands:

  • sv_servername "Name of server in quotes"
  • wm_timeScale 3 How Fast time moves
  • wm_forceTime -1 Force a current time
  • g_pinglimit 0 Ping required to join
/**
* 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 / ckeditor.js
Last active April 12, 2017 15:54
Directus CKEditor WYSIWYG
// Description: CKEditor Custom UI for Directus
// Author: Chris Sprance (Entrada Interactive) - www.csprance.com
// CKEditor Docs: http://docs.ckeditor.com/
define(['app', 'core/UIComponent', 'core/CustomUIView', 'core/t', 'core/overlays/overlays'], function (app, UIComponent, UIView, __t, Overlays) {
var Input = UIView.extend({
events: {},
template: 'ckeditor/input',
serialize: function () {
@csprance
csprance / startup.py
Last active December 20, 2016 19:56
Drop this in editor/Python/plugins/csSimBrush/startup.py
# @author Chris Sprance
# @Description Open the window from Tools->csTools->csSimBrush
# select a brush and click Convert Brush To SimBrush and it will sim and fall
# Move the object and press simulate again to simualte again
# Click Convert SimBrush to Brush to convert the selected simBrush back to a regular brush
from CrySide import QtWidgets
import SandboxBridge
from sandbox import general
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# title :miscron.py
# description : Runs commands to a server
# author :Chris Sprance / Entrada Interactive
# usage : This script is CLI for server administaration to run it from a command line do:
# misrcon.py -i [ip] --port [admin port] -p [admin password] --command [command] --time [exec_time] --s [schedule]
# python_version :2.7.5
# ==============================================================================
import xmlrpclib