Skip to content

Instantly share code, notes, and snippets.

Jake Kaufman theevocater

Block or report user

Report or block theevocater

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:e3af80267fa6863ba4af54d4d2cf85ee
gcc -std=c++11 main.cpp
/tmp/ccg9pIuw.o: In function `parseLineAndInsertWords(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
main.cpp:(.text+0x2d): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size() const'
main.cpp:(.text+0x50): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator[](unsigned long)'
main.cpp:(.text+0x81): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::substr(unsigned long, unsigned long) const'
main.cpp:(.text+0xa7): undefined reference to `std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
main.cpp:(.text+0xe3): undefined reference to `std::__
@theevocater
theevocater / ergodox.json
Created Feb 5, 2018
Ergodox json for my current layout
View ergodox.json
{
"header": {
"Name": "MDErgo1",
"Variant": "standard",
"Layout": "Default",
"Base": "Blank",
"Version": "0.1",
"Author": "HaaTa (Jacob Alexander) 2015",
"KLL": "0.3c",
"Date": "2015-09-12",
View gist:474a9e751f7e765231086cab2d7a63ea

Just a short list of things I had to do during my sierra upgrade to get back to ship shape.

Homebrew

Accept the new xcode license so you can use git etc:

sudo xcodebuild -license

Take control of /usr/local again. You may not need to do this if you have a more recent homebrew than I did. homebrew now lives in /usr/local/Homebrew:

@theevocater
theevocater / atomic_bool.go
Last active Sep 24, 2015
Atomic bool in go
View atomic_bool.go
package main
import (
"sync/atomic"
)
type AtomicBool struct {
value *int32
}
@theevocater
theevocater / load.sh
Created Mar 24, 2015
load git stuff osx
View load.sh
# load git completion
# we can depend on git-completion locally
if [[ -f $(brew --prefix)/etc/git-completion.bash ]] ; then
. $(brew --prefix)/etc/git-completion.bash
fi
# load these separately because git-prompt was introduced with git-1.8
if [[ -s $(brew --prefix)/etc/git-prompt.sh ]] ; then
. $(brew --prefix)/etc/git-prompt.sh
fi
@theevocater
theevocater / gist:adb46e28387c0c2f2845
Created Jan 9, 2015
Annoyed that homebrew's version of macvim can't be found by spotlight? I have a fix!
View gist:adb46e28387c0c2f2845
brew linkapps
osascript -e "tell app \"Finder\" to make new alias file at POSIX file \"/Applications\" to POSIX file \"$(stat -f%Y /Applications/MacVim.app)\"" && rm /Applications/MacVim.app;
@theevocater
theevocater / compile_weirdness.rs
Last active Aug 29, 2015
I was messing around with closures and ran into an odd problem with lifetimes and borrowing.
View compile_weirdness.rs
// these two I just don't understand why neither works.
fn it_does_not_works() -> String {
let mut output_string = String::new();
let do_a_thing: || -> () = | | {
output_string;
};
do_a_thing();
return output_string;
@theevocater
theevocater / gist:7763047
Created Dec 3, 2013
A snippet of bash to download the latest version of the git completion files locally and keep track of what version they are on
View gist:7763047
update_git_completion () {
# try to download the "correct" version of git completion
git_version=`git --version | cut -d" " -f3`
# check if we have the right version of git completion stuffs
if [[ -f git-completion.bash && -f git_completion_version && $git_version == `cat git_completion_version` ]]
then
echo "Up to date for $git_version"
else
# save the git version number
@theevocater
theevocater / gist:5854426
Created Jun 24, 2013
In which I try to compile 1 file with sbt
View gist:5854426
$ sbt
show sources
[info] Set current project to aw (in build file:/Users/jacobdeamkaufman/Code/aw.scala/)
> show sources
[info] ArrayBuffer(/Users/jacobdeamkaufman/Code/aw.scala/Expr.scala)
[success] Total time: 0 s, completed Jun 24, 2013 10:36:20 PM
> compile
[info] Updating {file:/Users/jacobdeamkaufman/Code/aw.scala/}default-60d9ca...
[info] Resolving org.scala-lang#scala-library;2.10.2 ...
[info] Done updating.
@theevocater
theevocater / gist:5846663
Created Jun 23, 2013
Trying to get a "scala" version of https://github.com/lkuper/aw/ and have to do this to get it to :load in the REPL. The REPL only recognizes companion objects defined on the same line as the original class so here we have everything defined on the same "line". If I'm wrong someone please tell me how to make this less awkward.
View gist:5846663
abstract class Expr {
}; case class Number(a: Int) extends Expr {
}; case class Plus(a: Expr, b: Expr) extends Expr {
}; case class Times(a: Expr, b: Expr) extends Expr {
}; case class Minus(a: Expr, b: Expr) extends Expr {
}; object Expr {
def interp(expr: Expr): Int =
expr match {
case Number(a) => a
You can’t perform that action at this time.