Skip to content

Instantly share code, notes, and snippets.

View wbarksdale's full-sized avatar

William Barksdale wbarksdale

View GitHub Profile
@wbarksdale
wbarksdale / Testing Gists
Created April 27, 2020 23:22
a test gist
This is a gist
This the 3rd line of the gist
class Foo {
let x: Int
}
struct Bar {
let y: Int
@wbarksdale
wbarksdale / GStreamer-1.0 some strings.sh
Created November 16, 2018 03:32 — forked from strezh/GStreamer-1.0 some strings.sh
GStreamer-1.0 personal cheat sheet
#!/bin/bash
# play YUV444 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
videoparse width=1920 height=1080 framerate=25/1 format=GST_VIDEO_FORMAT_Y444 ! \
videoconvert ! \
autovideosink
# play YUV422 FULL HD file
gst-launch-1.0 -v filesrc location=size_1920x1080.yuv ! \
[File]
size = 296804354
[ftyp: File Type Box]
position = 0
size = 24
major_brand = isom : ISO Base Media file format version 1
minor_version = 512
compatible_brands
brand[0] = isom : ISO Base Media file format version 1
brand[1] = mp41 : MP4 version 1
public abstract class FindCallback<T extends ParseObject> extends ParseCallback<List<T>> {
public abstract void done(List<T> list, ParseException parseException);
@Override
void internalDone(List<T> list, ParseException parseException) {
done(list, parseException);
}
}
@wbarksdale
wbarksdale / gist:6357024
Created August 27, 2013 18:13
UIScrollView sucks
self.frame = newframe;
self.unstackedRect = newframe;
self.subview.frame = CGRectMake(self.subview.frame.origin.x,
self.subview.frame.origin.y,
self.imageViews.count * 98,
99);
self.contentSize = CGSizeMake(self.imageViews.count * 98, self.subview.frame.size.height);
[self setScrollEnabled:YES];
@wbarksdale
wbarksdale / koansrunner.rb
Created March 13, 2013 17:17
An Automatic runner for learning with ruby Koans (http://rubykoans.com/) Whenever a file is modified, this will run the command "ruby path_to_enlightenment.rb"
#run this to automatically re-run "ruby path_to_enlightenment.rb" on save
ruby_files = Dir.entries(".").select{ |filename| filename[/.rb/] }
mtimes = ruby_files.map { |filename|
File.stat(filename).mtime
}
ruby_files.each { |filename| puts filename }
@wbarksdale
wbarksdale / gist:4464913
Created January 6, 2013 02:56
Multiple implicit parameters use case
object MainRouter {
implicit val session: Option[Session]
implicit val flash: ...
runRoutes {
UserController.routes
OtherController.routes
}
}
@wbarksdale
wbarksdale / newsbt.sh
Created September 16, 2012 21:13
A Simple shell script to set up a new sbt project with a provided name, a build.sbt file, a Build.scala file, and a main method, and the eclipse plugin. So all you need to do to get your project into eclipse is type "eclipse at the sbt prompt.
#!/bin/sh
EXPECTED_ARGS=1
E_BADARGS=65
if [ $# -ne $EXPECTED_ARGS ]
then
echo "usage: `basename $0` {newProjectName}"
exit $E_BADARGS
fi
mkdir $1
mkdir $1/src