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
?- use_module(library(clpfd)). | |
/* | |
Load: ['witch.prolog']. | |
Run: witch(5,Result). | |
*/ | |
witch(Top, Vars) :- | |
Vars = [L1,L2,L3,L4,L5,L6,L7,L8,L9,L10,L11,L12,L13,L14, | |
L15,L16,L17,L18,L19,L20,L21,L22,L23,L24,L25], |
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
?- use_module(library(clpfd)). | |
/* type go(200, Answer) to run the program. 200 is the highest side */ | |
/* length it will look for. */ | |
go(Top, [L1,L2,L3,L4,L5,L6,L7,L8,L9,L10,L11,L12,L13,L14, | |
L15,L16,L17,L18,L19,L20,L21,L22,L23,L24,L25]) :- | |
/* Start the timer */ |
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
@GET | |
@Path("/urlfetch/{url}") | |
public Response urlFetch(@PathParam("url") String userUrl) { | |
String result = ""; | |
try { | |
URL url = new URL("https://" + userUrl); | |
HttpURLConnection connection = (HttpURLConnection) url.openConnection(); | |
// Header is "Basic <base64 encoded username:password>" | |
// e.g. echo "kevin:password" | openssl env -base64 will give you this |
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/sh | |
PREFIX=$1 | |
while [ 1 ];do | |
for f in $PREFIX*;do | |
if ! lsof $f >/dev/null;then | |
echo $f is ready | |
# do something with it, then rm/mv it out of the way... | |
... | |
fi |
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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<name>Remap CapsLock to Hyper</name> | |
<appendix>OS X doesn't have a Hyper. This maps Left Control to Control + Shift + Option + Command.</appendix> | |
<identifier>space_cadet.left_control_to_hyper</identifier> | |
<autogen> | |
--KeyToKey-- KeyCode::F19, KeyCode::COMMAND_L, ModifierFlag::OPTION_L | ModifierFlag::SHIFT_L | ModifierFlag::CONTROL_L |
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
# This is Kev's slate file | |
config defaultToCurrentScreen true | |
config nudgePercentOf screenSize | |
config resizePercentOf screenSize | |
config windowHintsIgnoreHiddenWindows false | |
config windowHintsShowIcons true | |
config windowHintsDuration 10 | |
config focusPreferSameApp false |
NewerOlder