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
FROM amazonlinux:latest | |
RUN yum -y install wget tar git make cmake gcc-c++ libmad-devel libid3tag-devel libsndfile-devel gd-devel boost-devel | |
# Add compile script | |
ADD compile.sh / | |
RUN chmod +x /compile.sh | |
CMD tail -f /dev/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
USING PERIODIC COMMIT 10000 | |
LOAD CSV WITH HEADERS FROM 'file:///Tracks.csv' as line | |
WITH line, | |
CASE | |
WHEN toFloat(line.TEMPO) < 20 THEN "Larghissimo" | |
WHEN toFloat(line.TEMPO) >= 20 AND toFloat(line.TEMPO) < 40 THEN "Grave" | |
WHEN toFloat(line.TEMPO) >= 40 AND toFloat(line.TEMPO) < 60 THEN "Largo" | |
WHEN toFloat(line.TEMPO) >= 60 AND toFloat(line.TEMPO) < 80 THEN "Adagio" | |
WHEN toFloat(line.TEMPO) >= 80 AND toFloat(line.TEMPO) < 120 THEN "Moderato" | |
WHEN toFloat(line.TEMPO) >= 120 AND toFloat(line.TEMPO) < 180 THEN "Allegro" |
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
convert image.tif -resize 1.5625% -crop 256x256 +repage +adjoin out/1/tile_1_%d.jpg | |
convert image.tif -resize 3.125% -crop 256x256 +repage +adjoin out/2/tile_2_%d.jpg | |
convert image.tif -resize 6.25% -crop 256x256 +repage +adjoin out/3/tile_3_%d.jpg | |
convert image.tif -resize 12.5% -crop 256x256 +repage +adjoin out/4/tile_4_%d.jpg | |
convert image.tif -resize 25% -crop 256x256 +repage +adjoin out/5/tile_5_%d.jpg | |
convert image.tif -resize 50% -crop 256x256 +repage +adjoin out/6/tile_6_%d.jpg | |
convert image.tif -crop 256x256 +repage +adjoin out/7/tile_7_%d.jpg |
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
### Model | |
class ModelA < ActiveRecord::Base | |
has_many :modelb | |
end | |
class ModelB < ActiveRecord::Base | |
belongs_to :modela | |
has_many :modelc | |
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
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/url" | |
"os" | |
"sort" | |
"strings" |
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" | |
"golang.org/x/net/html" | |
"io" | |
"log" | |
"net/http" | |
"os" | |
"sort" |
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
// simple fragment shader | |
// 'time' contains seconds since the program was linked. | |
uniform float time; | |
uniform sampler2D tex; | |
uniform sampler2D tex2; | |
float radius = .5; |
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
sudo rm -rf /usr/local/{bin/{node,npm},lib/node_modules/npm,lib/node,share/man/*/node.*} |
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
@form.ajaxForm | |
dataType: 'json' | |
beforeSend: => | |
# ui treatement | |
uploadProgress: (event, position, total, percentComplete) => | |
# progress ui | |
complete: (xhr) => | |
# fetch model based on id |
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
upstream unicorn_production { | |
server unix:/usr/local/nature-valley/current/tmp/sockets/unicorn.sock; | |
} | |
server { | |
listen 80; | |
server_name "Name of the server"; | |
access_log /var/log/nginx/nv.log; | |
error_log /var/log/nginx/nv.error.log; | |
root "public directory of Rails App; |
NewerOlder