This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Configs | |
| S.cfga({ | |
| "defaultToCurrentScreen" : true, | |
| "secondsBetweenRepeat" : 0.1, | |
| "checkDefaultsOnLoad" : true, | |
| "focusCheckWidthMax" : 3000, | |
| "orderScreensLeftToRight" : true | |
| }); | |
| // Monitors |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias dt='date +"%Y-%m-%d %H:%M:%S %z";TZ=UTC date +"%Y-%m-%d %H:%M:%S %z"' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| grant { | |
| permission java.security.AllPermission; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.List; | |
| import java.util.ArrayList; | |
| public class RunOutOfHeap { | |
| public static void main(String[] args) { | |
| // Allocate 1MB buffers until we run out of space | |
| final List<byte[]> buffers = new ArrayList<byte[]>(); | |
| while (true) { | |
| buffers.add(new byte[1024 * 1024]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.List; | |
| import java.util.LinkedList; | |
| import java.util.Random; | |
| public class AllocateAndGC { | |
| public static void main(String[] args) { | |
| while (true) { | |
| // Allocate some objects | |
| List<Integer> numbers = allocateToHeap(Integer.parseInt(args[0])); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| user@host:tutorial$ ls | |
| AllocateToHeap.java | |
| user@host:tutorial$ javac AllocateToHeap.java | |
| user@host:tutorial$ ls | |
| AllocateToHeap.class AllocateToHeap.java | |
| user@host:tutorial$ java AllocateToHeap | |
| Outputting: 1 | |
| Outputting: 2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class AllocateToHeap { | |
| public static void main(String[] args) { | |
| // Using the `new` keyword, I've allocated some objects to the heap | |
| final Integer heapObject1 = new Integer(1); | |
| final Integer heapObject2 = new Integer(2); | |
| // Calling a function, I've passed references to these objects on the stack | |
| output(heapObject1); | |
| output(heapObject2); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # The "post-receive" script is run after receive-pack has accepted a pack | |
| # and the repository has been updated. It is passed arguments in through | |
| # stdin in the form | |
| # <oldrev> <newrev> <refname> | |
| # For example: | |
| # aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master | |
| fifo="/tmp/gitbotmercuryfifo" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [push] | |
| default = current | |
| [alias] | |
| ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate | |
| ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat | |
| lnc = log --pretty=format:"%h\\ %s\\ [%cn]" | |
| lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short | |
| ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative | |
| le = log --oneline --decorate | |
| filelog = log -u |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Slate config file | |
| # Author: Chris Fournier <chris.m.fournier@gmail.com> | |
| config defaultToCurrentScreen true | |
| config nudgePercentOf screenSize | |
| config resizePercentOf screenSize | |
| # Abstract positions | |
| alias full move screenOriginX;screenOriginY screenSizeX;screenSizeY | |
| alias lefthalf move screenOriginX;screenOriginY screenSizeX/2;screenSizeY |
NewerOlder