Skip to content

Instantly share code, notes, and snippets.

View stephenwithav's full-sized avatar

Steven Edwards stephenwithav

View GitHub Profile
@stephenwithav
stephenwithav / delete.js
Last active December 19, 2018 15:06
DevPRO Delete Servers, one at a time, top server first.
var config = { attributes: true, childList: true, subtree: true };
let callback = function(mutated, observer) {
console.log(mutated)
let button = document.querySelector("#btns button:last-child").click();
}
var observer = new MutationObserver(callback);
observer.observe(document.querySelector('#modalBody'), config);
@stephenwithav
stephenwithav / build.js
Last active December 19, 2018 22:17
CloudAtCost Dev server build script
let config = { attributes: true, childList: true, subtree: true };
let serverConfig = { ram: 2048, cpu: 4, storage: 35, os: 30 };
let callback = function(mutated, observer) {
console.log(mutated)
let button = document.querySelector("#modalBody button");
switch (button.innerText) {
case "Add New Server":
button.click();
break;
@stephenwithav
stephenwithav / test.nim
Created December 13, 2018 15:02
Nim ffmpeg binding attempt
## Start by making the following imports work
import libavutil/avutil
import libavutil/frame
import libavutil/pixfmt
import libavcodec/avcodec
import libavformat/avformat
import nim_ffmpeg_common
let codec = avcodec_find_encoder_by_name("mpeg4")
@stephenwithav
stephenwithav / cider-sheet.md
Last active August 30, 2018 21:37
CIDER cheatsheet

A list of (imo) the most useful CIDER and nREPL keybindings:

  1. C-c C-x C-j C-j: Jack-in to nREPL.
  2. C-c C-k: eval the current buffer.
  3. C-c C-z: Switch between nREPL and last-buffer-viewed.
  4. C-u C-c C-z: Switch nREPL namespace to match current buffer.
  5. C-c C-t C-n: Run tests for current namespace.
  6. C-c C-t C-g: Re-run last tests.
  7. C-c C-t C-r: Re-run failed tests.
  8. C-c C-t C-p: Run tests for all project namespaces.
@stephenwithav
stephenwithav / package.json
Created March 19, 2017 21:10
typescript -- test.ts(1,13): error TS2304: Cannot find name 'Set'.
{
"name": "test",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
sudo dpkg --add-architecture i386
sudo add-apt-repository -y ppa:wine/wine-builds
sudo add-apt-repository -y ppa:ethanak/milena
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install -y --install-recommends winehq-devel
sudo apt-get install -y sapi4linux python-pyspda python-sapilektor libsapilektor-utils
#download das vozes
#wget http://150.165.205.9/players/ivona/ivona-full.tar.gz
@stephenwithav
stephenwithav / main.cs
Created December 23, 2016 21:40
speech synthesis fail
using System;
using System.IO;
using System.Speech.Synthesis;
namespace SampleSynthesis
{
class Program
{
static void Main(string[] args)
{
@stephenwithav
stephenwithav / README.md
Created December 2, 2016 12:04 — forked from fhernand/README.md
Visualization of passes in a soccer game

A graph of passes done between players of Real Madrid in the 1st half of the 23.09.2014 game vs. Elche.

func Round(f float64) float64 {
return math.Floor(f+.5)
}
@stephenwithav
stephenwithav / cac buk coupon
Last active December 1, 2015 10:00
cac test
var items=$("a[onclick^='cart.apply']").map(function(i,el){return $(el).attr('onclick')});
var itemids = new Array(items.length)
for (var i=0;i<items.length;i++){ var s=new String(items[i]); itemids[i]=s.substring(18,31); }
for (var i=0;i<itemids.length;i++){ var url="https://members.cloudatcost.com/index.php?fuse=admin&controller=signup&action=validatecoupon&couponCode="+coupon+"&itemID="+itemids[i]; $.get(url) }