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
CREATE TABLE IF NOT EXISTS stopwords ( | |
word VARCHAR(20) NOT NULL; | |
); | |
CREATE OR REPLACE FUNCTION remove_stopwords(string TEXT, OUT tsv TSVECTOR) AS | |
$$ | |
BEGIN | |
SELECT string_agg(words.*, ' ')::tsvector FROM | |
-- split tsvector into row for each word | |
regexp_split_to_table( |
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
defmodule Foo.Model.Job do | |
alias Foo.Model.JobToJob, as: JobToJob | |
use Ecto.Model | |
schema "jobs" do | |
field :name, :string | |
has_many :children, JobToJob, foreign_key: :parent_id | |
has_many :parents, JobToJob, foreign_key: :child_id | |
end | |
end |
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 | |
# from http://stackoverflow.com/questions/620650/can-i-easily-update-all-local-git-branches-from-remote-branches-simultaneously | |
main() { | |
REMOTES="$@"; | |
if [ -z "$REMOTES" ]; then | |
REMOTES=$(git remote); | |
fi | |
REMOTES=$(echo "$REMOTES" | xargs -n1 echo) |
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
# | |
# css/js minification/compression makefile | |
# | |
# | |
# JS_TARGETS -- js files to minify/gzip | |
# CSS_TARGETS -- css files to minify/gzip | |
# CLEANUP -- additional files to delete during "make clean" | |
# |
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/Makefile.in b/Makefile.in | |
index 7ab25ff..34f5f36 100644 | |
--- a/Makefile.in | |
+++ b/Makefile.in | |
@@ -16,9 +16,9 @@ DYNAMIC_EXTENSION := .so | |
DYNAMIC_FULL_VERSION := .2.1.0 | |
DYNAMIC_ABI_VERSION := .2 | |
DYNAMIC_LIBNAME := librubberband$(DYNAMIC_EXTENSION) | |
-DYNAMIC_LDFLAGS := -shared -Wl,-Bsymbolic -Wl,-soname=$(DYNAMIC_LIBNAME)$(DYNAMIC_ABI_VERSION) | |
-VAMP_LDFLAGS := -shared -Wl,-Bsymbolic -Wl,--version-script=vamp/vamp-plugin.map |
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/plugins/amp.so b/plugins/amp.so | |
index 2d0f2dd..f6e5de3 100755 | |
Binary files a/plugins/amp.so and b/plugins/amp.so differ | |
diff --git a/plugins/delay.so b/plugins/delay.so | |
index de567c2..8119c46 100755 | |
Binary files a/plugins/delay.so and b/plugins/delay.so differ | |
diff --git a/plugins/filter.so b/plugins/filter.so | |
index 53e36dc..7043920 100755 | |
Binary files a/plugins/filter.so and b/plugins/filter.so differ | |
diff --git a/plugins/noise.so b/plugins/noise.so |
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/applyplugin.c b/src/applyplugin.c | |
index 335e89b..2fefd91 100644 | |
--- a/src/applyplugin.c | |
+++ b/src/applyplugin.c | |
@@ -6,7 +6,7 @@ | |
/*****************************************************************************/ | |
#include <dlfcn.h> | |
-#include <endian.h> | |
+#include <machine/endian.h> |
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/Makefile.in b/Makefile.in | |
index 5acc5f0..3605557 100644 | |
--- a/Makefile.in | |
+++ b/Makefile.in | |
@@ -104,8 +104,8 @@ PLUGIN_LDFLAGS = $(DYNAMIC_LDFLAGS) -Wl,--version-script=build/vamp-plugin.map | |
## For OS/X with g++: | |
DYNAMIC_LDFLAGS = -dynamiclib | |
PLUGIN_LDFLAGS = $(DYNAMIC_LDFLAGS) | |
-SDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) | |
-HOSTSDK_DYNAMIC_LDFLAGS = $(DYNAMIC_LDFLAGS) |
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 https = require('https'); | |
var util = require('util'); | |
exports.handler = function(event, context) { | |
console.log(JSON.stringify(event, null, 2)); | |
console.log('From SNS:', event.Records[0].Sns.Message); | |
var postData = { | |
"channel": "#aws-sns", | |
"username": "AWS SNS via Lamda :: DevQa Cloud", |
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
defmodule NodeTest do | |
use ExUnit.Case | |
test "can have childen and parents" do | |
node1 = %Node{name: "parent"} |> Repo.insert | |
node2 = %Node{name: "child2"} |> Repo.insert | |
%NodeToNode{parent_id: node1.id, child_id: node.id} |> Repo.insert | |
assert Node.get_children(node1) == [node2] | |
assert Node.get_parents(node2) == [node1] | |
end |
NewerOlder