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 | |
wget https://github.com/Pyppe/phantomjs2.0-ubuntu14.04x64/raw/master/bin/phantomjs | |
sudo chmod 755 phantomjs | |
sudo mv phantomjs /usr/bin |
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 | |
# Following the guide found at this page | |
# http://programmingarehard.com/2014/03/17/behat-and-selenium-in-vagrant.html | |
echo "\r\nUpdating system ...\r\n" | |
sudo apt-get update | |
# Create folder to place selenium in |
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 | |
sudo apt-get update | |
sudo apt-get install git | |
curl -O https://storage.googleapis.com/golang/go1.6.linux-amd64.tar.gz | |
tar -xvf go1.6.linux-amd64.tar.gz |
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 spawnSync = require('child_process').spawnSync; | |
const defaultDestPath = __dirname + '/pdf'; | |
function convertToPdf(filepath, destpath) { | |
var resp = {}; | |
if (destpath == undefined) { | |
destpath = defaultDestPath; | |
} |
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 ( | |
"bytes" | |
"encoding/binary" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"time" |
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 <Servo.h> | |
Servo myservo; | |
void setup() { | |
Serial.begin(9600); | |
myservo.attach(9); | |
} | |
void loop() { |
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 smq | |
//SMQ is the main controller for the queue. | |
type SMQ struct { | |
jobQueue chan []byte | |
consumer chan Message | |
worker chan int | |
} | |
//New takes in the max queue size and workers. |
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
export default { | |
subtract(date, days) { | |
return this.add(date, -days); | |
}, | |
add(date, days) { | |
const result = new Date(date); | |
result.setDate(result.getDate() + days); | |
return result; | |
}, | |
addMonths(date, months) { |
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
func (s *Service) ChunkUpload(ctx context.Context, r *multipart.Reader) error { | |
chunk, err := s.parseChunk(r) | |
if err != nil { | |
return fmt.Errorf("failed parsing chunk %w", err) | |
} | |
// checkpoint | |
select { | |
case <-ctx.Done(): | |
// Abort / return early |
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 dnf install vips vips-tools vips-devel |
OlderNewer