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
CC := gcc | |
radTest: radLoadWords.c radTrie.o element.o wordTransition.o | |
$(CC) -DTEST_LOAD_WORDS radTrie.o element.o wordTransition.o radLoadWords.c -o $@ | |
%.o: %.c | |
$(CC) -c $< -o $@ | |
clean: | |
rm -f *.o radTest |
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
diff --git a/src/master.c b/src/master.c | |
index cd846e1..0733d3b 100644 | |
--- a/src/master.c | |
+++ b/src/master.c | |
@@ -354,7 +354,7 @@ bud_error_t bud_master_get_spawn_args(bud_config_t* config, char*** out) { | |
} else { | |
/* Goal is to skip piped_index, thus excluding --piped-config argument: */ | |
for (i = 0, j = 0; i < config->piped_index; i++, j++) | |
- args[j++] = config->argv[i]; | |
+ args[j] = config->argv[i]; |
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
var _un = require('underscore'); | |
var url = require('url'); | |
var util = require('util'); | |
var request = require('request'); | |
function walkUrl(targetUrl, callback) { | |
var probes = {}; | |
var errBucketIndex = 5; | |
// status codes are in the range 100 - 999 |
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
// Author: Emmanuel Odeke <odeke@ualberta.ca> | |
// Module to handle platform agnostic loading of dynamic libraries | |
#include <stdio.h> | |
#include <stdlib.h> // For exit(...) | |
#include <stdarg.h> | |
#include "lib_loader.h" | |
static errorReporter errReporter = NULL; |
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
package main | |
import "fmt" | |
func commonPrefix(values ...string) string { | |
vLen := len(values) | |
if vLen < 1 { | |
return "" | |
} | |
minIndex := 0 |
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
#include <stdio.h> | |
#include <string.h> | |
int main() { | |
char *lang = "c_language"; | |
size_t len = strlen(lang); | |
size_t i; | |
for (i = 0; i < len; ++i) { | |
const char c = lang[i]; |
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
var bucket = new AWS.S3({params: {Bucket: 'foo'}}); | |
var callback = function(err, data) { if (err) console.log(err); else console.log(data);} | |
// Objects since 2015-02-23 | |
bucket.listObjects({Prefix: '2015-02', Marker: '2015-02-23-00:00:00'}, callback); | |
// Objects after 4:00 p.m on 2015-02-23 | |
bucket.listObjects({Prefix: '2015-02-23', Marker: '2015-02-23-16:00:00'}, callback); |
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 | |
target_name="foo" # Remember to set your name here | |
target_email="foo@example.com" # Set the new email here | |
git filter-branch --commit-filter 'if [ "$GIT_AUTHOR_NAME" = $target_name ]; | |
then export GIT_AUTHOR_EMAIL=$target_email; | |
fi; git commit-tree "$@"' |
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
#include <stdio.h> | |
int main() { | |
FILE *ifp = fopen(__FILE__, "r"); | |
if (ifp == NULL) | |
return -1; | |
char c; | |
while ((c = getc(ifp)) != EOF) putchar(c); | |
fclose(ifp); | |
return 0; |
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
const crypto = require('crypto'); | |
function hexSha256ify(password) { | |
var sha256sum = crypto.createHash('sha256'); | |
sha256sum.update(password + ''); | |
return sha256sum.digest('hex'); | |
} | |
function createNewUser(data) { | |
data = data || {}; |
OlderNewer