I hereby claim:
- I am loriopatrick on github.
- I am plorio (https://keybase.io/plorio) on keybase.
- I have a public key whose fingerprint is CD62 C033 CFF3 478A CE60 C48A 9518 BA65 5338 15C2
To claim this, I am signing this object:
package audiosource; | |
import javax.sound.sampled.*; | |
import java.io.IOException; | |
import java.nio.ByteBuffer; | |
public class Listener { | |
public Listener() throws LineUnavailableException { | |
audioFormat = new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, sampleRate, sampleSize, | |
channels, sampleSize / 8 * channels, sampleRate, true); |
var exec = require('child_process').exec; | |
function getIp(callback) { | |
exec('wget -qO- http://ipecho.net/plain ; echo', function (error, stdout, stderror) { | |
if (error) { | |
callback(error, null); | |
return; | |
} | |
var ip = stdout.replace('\n', ''); |
#include <stdio.h> | |
typedef struct { | |
float x; | |
float y; | |
char* name; | |
} Player; | |
typedef void (*PlayerCommand)(Player* player); |
CC=clang | |
FLAGS=-Wall -g | |
INCLUDE=-I./include | |
EXEC=out/program | |
SRC=$(wildcard src/*.c) | |
OBJ=$(SRC:src/%.c=obj/%.o) | |
run: setup link | |
./$(EXEC) |
#include <stdio.h> | |
#include <stdlib.h> | |
#define call(VAR, METHOD, ...) (VAR)->METHOD(VAR, __VA_ARGS__) | |
#define with(TYPE, NAME, VALUE, BODY) {TYPE NAME = VALUE; BODY free(NAME);} | |
void flyImpl(void* rocket, int x_fore, int y_fore) { | |
printf("Applying force (%i, %i)\n", x_fore, y_fore); | |
} |
import java.io.*; | |
import java.net.URL; | |
import java.net.URLEncoder; | |
/** | |
* @author Patrick Lorio | |
*/ | |
public class WebCache { | |
public static InputStream GetWeb(String url) throws IOException { | |
File file = new File("cache/" + URLEncoder.encode(url, "UTF-8")); |
import org.joda.time.DateTime; | |
import javax.crypto.Mac; | |
import javax.crypto.spec.SecretKeySpec; | |
import javax.xml.bind.DatatypeConverter; | |
import java.io.UnsupportedEncodingException; | |
import java.net.URLEncoder; | |
import java.security.InvalidKeyException; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.Iterator; |
TextureRegion[][] parts = TextureRegion.split(new Texture("path.png"), 15, 23); | |
boolean[][] used = new boolean[parts.length][parts[0].length]; | |
Random random = new Random(); | |
int ix = random.nextInt(used.length); | |
int iy = random.nextInt(used[0].length); | |
while (used[ix][iy]) { | |
// todo: pick new | |
} |
# execute commands | |
gitlet init | |
echo 'a init' > a_other_change.txt | |
echo 'b init' > b_master_change.txt | |
echo 'c init' > c_other_remove.txt | |
echo 'd init' > d_master_remove.txt | |
echo 'e init' > e_both_remove.txt | |
echo 'f init' > f_both_change.txt |
I hereby claim:
To claim this, I am signing this object: