Skip to content

Instantly share code, notes, and snippets.

View msollami's full-sized avatar

Michael Sollami msollami

View GitHub Profile
@msollami
msollami / .zshrc
Last active August 29, 2015 14:15
sollami-zshrc
alias ssh='ssh -YC'
alias ll='ls -lahG --color=auto'
alias gcb='git rev-parse --abbrev-ref HEAD'
alias ..="cd .."
alias ..2="cd ../.."
alias ..3="cd ../../.."
alias ..4="cd ../../../.."
alias ..5="cd ../../../../.."
@msollami
msollami / JavaReloader.m
Created October 5, 2014 18:24
An OS-agnostic version of the SimpleJavaReloader package. ** Language = Mathematica
BeginPackage["SimpleJavaReloader`", {"JLink`"}];
JCompileLoad::usage =
"JCompileLoad[javacode_,addToClassPath_] attempts to compile a Java \
class defined by a string javacode, optionally adding to Java compiler classpath \
files and folders from addToClassPath, and load the resulting class into
Mathematica";
Begin["`Private`"]
@msollami
msollami / 0_reuse_code.js
Last active August 29, 2015 14:07
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@msollami
msollami / Julia Zoomer
Created May 14, 2012 10:44
Mathematica code for an interactive julia set explorer
quadrant = Switch[{#2[[1]]-#1[[1]], #2[[2]]-#1[[2]]},
{_?Positive, _?Positive}, {1, 1},
{_?Negative, _?Positive}, {-1, 1},
{_?Positive, _?Negative}, {1, -1},
_, {-1,-1}
] * Abs /@ {#2[[1]]-#1[[1]], #2[[1]]-#1[[1]]}&;
julia = Compile[{{z,_Complex}},
Length[FixedPointList[Tan[#^3+2.0625+0.15 I]&, z, 250, SameTest->(Abs[#]>2&)]],
RuntimeAttributes->{Listable}, Parallelization->True, CompilationTarget->"C"