This file contains 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
/* | |
* Initialize JInput and get reference to `controller` | |
* Implementing this is left as an exercise to the reader | |
*/ | |
initializeJInput(); | |
String[] directions = { "NW", "N", "NE", "E", "SE", "S", "SW", "W" }; | |
EventQueue eventQueue = controller.getEventQueue(); | |
Event event = new Event(); // reused by the EventQueue |
This file contains 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.io.*; | |
import java.nio.CharBuffer; | |
/** | |
* Extracts unicode characters less than 0x1F0F1 from a file. | |
* <br /> | |
* Created for http://www.reddit.com/r/program/comments/1tvh50/request_unicodetxt/ | |
* <br /> | |
* Usage: java UnicodeCharExtract path/to/file > output.txt | |
* <br /> |
This file contains 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.logging.ConsoleHandler; | |
import java.util.logging.Handler; | |
import java.util.logging.Level; | |
import java.util.logging.Logger; | |
class LoggerSuppress | |
{ | |
private void setLogHandlerLevel(Level level) | |
{ |
This file contains 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
Standard IRC commands: | |
/away | |
/ban | |
/unban | |
/deop | |
/dehalfop | |
/devoice | |
/invite | |
/join | |
/kick |
This file contains 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
<Profile name="User" version="3"> | |
<ActionSet name="Generic" radialMenuNavigation="Right"> | |
<Action name="StartChatText"> | |
<Trigger>Return</Trigger> | |
</Action> | |
<Action name="Reply"> | |
<Trigger>Backspace</Trigger> | |
</Action> | |
<Action name="TogglePerformance"> | |
<Trigger>Alt_Left+F</Trigger> |
This file contains 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.io.IOException; | |
import java.nio.file.*; | |
import java.nio.file.attribute.*; | |
public class chown { | |
private static final int | |
ERR_FEW_ARGS = 1, | |
ERR_FIRST_ARG = 2, | |
ERR_FILE_NONEXISTANT = 3, |
This file contains 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/sh | |
PREFIX=i686-w64-mingw32 | |
export CC=$PREFIX-gcc | |
export CXX=$PREFIX-g++ | |
export CPP=$PREFIX-cpp | |
export RANLIB=$PREFIX-ranlib | |
exec "$@" |
This file contains 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 | |
#magically arrayify $PATH | |
IFS=':' read -a arr <<< "$PATH" | |
# iterate | |
for i in "${arr[@]}"; do | |
# grep for arg 1 | |
ls -1 "$i" | fgrep "$1" | |
done |
This file contains 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 | |
ps -Ne u | |
ps aux | fgrep "$1" | fgrep -v fgrep | fgrep -v $$ |
This file contains 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.*; | |
class Braces { | |
public static void main(String[] args) { | |
List<String> list = new ArrayList<String>(){{ | |
add("michael"); | |
add("was"); | |
add("here"); | |
}}; | |
OlderNewer