Skip to content

Instantly share code, notes, and snippets.

ctrl+6 - methods fuzzy search.
alt+cmd+left/right - back/forward
cmd+shift+j (on code screen) - show in project navigator
@jamiecurran
jamiecurran / gist:b24a5cc35cd54a5f0cd3
Created September 28, 2015 09:22
emacs - cheatsheet
C-x h (M-x mark-whole-buffer)
C-M-\ (M-x indent-region)
C-y (paste)
@jamiecurran
jamiecurran / gist:f364911b887d9b7aac49
Last active August 29, 2015 14:22
string replace algorithm
public String replace(String original, String toReplace, String replaceWith) {
char[] origArray = original.toCharArray();
char[] toReplaceArray = toReplace.toCharArray();
StringBuilder result = new StringBuilder();
int index = 0;
while(index < origArray.length){
if(isPotentialMatch(origArray[index], toReplaceArray[index])){
if(isMatch(index, origArray, toReplaceArray)){
result.append(replaceWith);
@jamiecurran
jamiecurran / gist:bfdd83f843250e4f3bac
Last active August 29, 2015 14:17
emacs cheat sheet
git (magit)
M-x magit-status
g - refresh buffer
s - stage
u - unstage
c - commit menu -> c - commit (pre-message) -> C-c C-c - commit
P - push
Projectilte
@jamiecurran
jamiecurran / gist:7134a8ea0cc15ec7af80
Created March 1, 2015 14:47
clojure thrush/threading
--> first param
->> last param
@jamiecurran
jamiecurran / gist:49bb3a9cd2b6b45ec375
Last active August 29, 2015 14:13
Recruiter blacklist email filter string
from:(@opusrs.com OR @gcsltd.com OR gcsltd.ie OR @vertex-it-solutions.com OR @strgroup.co.uk OR @selbyjennings.com OR @evolutionjobs.co.uk OR @dpconnect.co.uk OR @arrowsgroup.com OR @computerfutures.com OR @astoncarter.co.uk OR @oliverbernard.co.uk)
@jamiecurran
jamiecurran / gist:d345bbb507626d3ec667
Created December 10, 2014 09:50
Recruiter Advice
I'm really trying not to be rude but the number of recruiter spam I'm getting is really becoming irritating. For future reference:
a) Don't email me an opportunity off the back of a key word search. Check out my cv or linkedin profile before forwarding opportunities. It really shows a complete lack of effort on your part
b) I've dealt with a lot of recruiters in my time. A £500 referral fee in pathetic considering the potential fee your company receives on each placement.
Going forward, I'll be telling my network of technical people about every recruiter/recruitment company which clearly isn't concerned about the level of service they provide and shows a distinct lack of effort when it comes to matching potential candidates to a role. As you know, the London tech scene is very similar to the game 'six degrees of kevin bacon' - word gets around.
I hope this provides some insight and helps with future placements.
Kind Regards
[& args] - varargs
:require - refer to other clojure namespaces
:import - import java classes
(def sum [& args]....
@jamiecurran
jamiecurran / gist:8b31e7f58f7f2059b3f9
Created September 19, 2014 17:58
Factorials - Java
import java.util.stream.IntStream;
public class Factorials {
public static void main(String[] args) {
Integer input = Integer.valueOf(args[0]);
System.out.printf("factorial of %d (v7) = %d\n", input, version7(input));
System.out.printf("factorial of %d (v8) = %d\n", input, version8(input));
System.out.printf("factorial of %d (recursive) = %d\n", input, recursive(input));