Skip to content

Instantly share code, notes, and snippets.

Avatar

Will Navidson yamamushi

View GitHub Profile
View gist:c7d49c76f8c6dead2536725bd0728dd4
// Taken from
// https://stackoverflow.com/questions/26916952/go-retrieve-a-string-from-between-two-characters-or-other-strings/62555190#62555190
func GetStringInBetweenTwoString(str string, startS string, endS string) (result string,found bool) {
s := strings.Index(str, startS)
if s == -1 {
return result,false
}
newS := str[s+len(startS):]
e := strings.Index(newS, endS)
@yamamushi
yamamushi / y2split
Created May 26, 2020
Youtube to Spleeter Wrapper
View y2split
#!/bin/bash
while getopts o:y:s:q: option
do
case "${option}"
in
o) OUTPUT=${OPTARG};;
y) YOUTUBE=${OPTARG};;
s) STEMS=${OPTARG};;
q) QUALITY=${OPTARG};;
@yamamushi
yamamushi / convert
Created Jul 9, 2017
discordgo ogg example
View convert
/*
I use the following to convert my audio source into ogg/opus :
avconv -i source.mp4 -f wav - | opusenc --bitrate 256 - output.opus
On OSX avconv is in libav, and opusenc is in opus-tools
$ brew install libav opus-tools
@yamamushi
yamamushi / du_ks.py
Created Oct 7, 2016
quick script for pulling info about the dual universe kickstarter
View du_ks.py
#!/usr/bin/env python
import urllib2
import json
import time
req = urllib2.Request("https://www.kickstarter.com/projects/search.json?search=&term=Dual%20Universe")
opener = urllib2.build_opener()
f = opener.open(req)
response = json.loads(f.read())
View gist:362342652b12aabcb16b
#import "macsupport.h"
/* Portions of CPS.h */
typedef struct CPSProcessSerNum
{
UInt32 lo;
UInt32 hi;
} CPSProcessSerNum;
extern OSErr CPSGetCurrentProcess( CPSProcessSerNum *psn);
View gist:ba7d4f96113750afe9e7
/* SDLMain.m - main entry point for our Cocoa-ized SDL app
Initial Version: Darrell Walisser <dwaliss1@purdue.edu>
Non-NIB-Code & other changes: Max Horn <max@quendi.de>
Feel free to customize this file to suit your needs
*/
#ifndef _macsupport_h_
#define _macsupport_h_
@yamamushi
yamamushi / AnalogLiterals.hpp
Created May 26, 2015
Multi-Dimensional Analog Literals in C++
View AnalogLiterals.hpp
/*
Referenced from:
http://web.archive.org/web/20120110153227/http://weegen.home.xs4all.nl/eelis/analogliterals.xhtml
*/
#ifndef ANALOGLITERALS_HPP
#define ANALOGLITERALS_HPP
namespace analog_literals {
@yamamushi
yamamushi / gist:dd7e7f5791ce497e68a4
Created May 19, 2015
Setting up a modern C++ development environment on Linux with Clang and Emacs
View gist:dd7e7f5791ce497e68a4
This was mirrored from the snapshot of earthserver.com available on archive.org
--------------------------------------------------------------------------------
Setting up a modern C++ development environment on Linux with Clang and Emacs
I am an independent game developer and this is my personal wiki.
Please feel free to email hello@earthserver.com, and to follow @Earthserver
(Redirected from Setting up a C++11 development environment on Linux with Clang and Emacs)
@yamamushi
yamamushi / makefile-osx
Created Jun 17, 2014
OSX Makefile for libtcod
View makefile-osx
# libtcod makefile
# to build debug version, run "make -f makefile-linux debug"
# to build release version, run "make -f makefile-linux release"
SRCDIR=src
INCDIR=include
#dependencies
# SDL
SDL_FLAGS=`sdl-config --cflags`
SDL_LIBS=`sdl-config --libs`
View keybase.md

Keybase proof

I hereby claim:

  • I am yamamushi on github.
  • I am yamamushi (https://keybase.io/yamamushi) on keybase.
  • I have a public key whose fingerprint is 6682 0389 C1FD B417 9D05 3BAD 8821 91F6 6E1D AA32

To claim this, I am signing this object: