Skip to content

Instantly share code, notes, and snippets.

Sergio Vilar sergiovilar

Block or report user

Report or block sergiovilar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:d7cf36d00f7c3c6915b5
{
"alt-speed-down": 50,
"alt-speed-enabled": false,
"alt-speed-time-begin": 540,
"alt-speed-time-day": 127,
"alt-speed-time-enabled": false,
"alt-speed-time-end": 1020,
"alt-speed-up": 50,
"bind-address-ipv4": "0.0.0.0",
"bind-address-ipv6": "::",
View gist:6bd85be84988372fcb36
sudo apt-get update
sudo apt-get install transmission-daemon
sudo usermod -a -G pi debian-transmission
View gist:587c4c6326e7ad02055c
cd ~/
git clone git@github.com:sergiovilar/dropbox-downloader.git
mv ~/.dropbox_settings ~/dropbox-downloader/settings.json
View gist:097bf9ad7d40a60e4f63
cd ~/
git clone git@github.com:Phlaphead/dropbox-sync-js.git
cd dropbox-sync-js
npm install
node sync.js
@sergiovilar
sergiovilar / gist:3929f75a931d58facc35
Created Jun 7, 2015
Install node.js and dependencies
View gist:3929f75a931d58facc35
wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
npm install -g forever
@sergiovilar
sergiovilar / torrents-to-downloads.scpt
Created May 26, 2015
Applescript watcher to move files to another folder when a new item is added
View torrents-to-downloads.scpt
property dialog_timeout : 30 -- set the amount of time before dialogs auto-answer.
on adding folder items to this_folder after receiving aadded_items
tell application "Finder"
set home_path to path to home folder as string
set work_folder to folder (home_path & "Dropbox:Torrents")
set target_folder to folder (home_path & "Downloads")
move entire contents of work_folder to target_folder
end tell
View UserBO.scala
package com.scrumplus.bo.entity
import com.scrumplus.core.framework.crud.{CRUD, BaseCRUD}
import com.scrumplus.core.framework.exception.{ErrorCode, ValidationException}
import com.scrumplus.core.util.PasswordUtil
import com.scrumplus.entity.User
/**
* @project simple-heroku-webapp
* @author sergiovilar
View User.scala
package com.scrumplus.entity
import java.util.Date
import javax.persistence._
import com.scrumplus.core.framework.crud.{AppEntity, BaseCRUD}
import scala.beans.BeanProperty
/**
* @project simple-heroku-webapp
* @author sergiovilar
View validations.scala
var validations = Map(
"email" -> Map(
"function" -> ((bo: CRUD, email: String) => bo.findBy("email", email).size() > 0),
"message" -> "Este email já está em uso"
),
"username" -> Map(
"function" -> ((bo: CRUD, username: String) => bo.findBy("username", username).size() > 0),
"message" -> "Este nome de usuário já está em uso"
)
)
You can’t perform that action at this time.