This file contains hidden or 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
<section | |
data-background="linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url(img/bg.jpg)" | |
data-background-size="cover" | |
></section> | |
<!-- sources: | |
https://css-tricks.com/tinted-images-multiple-backgrounds/ | |
https://css-tricks.com/perfect-full-page-background-image/ --> |
This file contains hidden or 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
namespace :deploy do | |
DEVELOPMENT_APPS = ['example-development'] | |
STAGING_APPS = ['example-staging'] | |
PRODUCTION_APPS = ['example', 'example2', 'example-demo'] | |
REMOTE = ENV['REMOTE_HOST'] || '[email protected]' | |
def shell_cmd(cmd) | |
begin | |
sh "#{cmd}" | |
rescue |
This file contains hidden or 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/sh | |
# Convert the latest *.webm video (works with other formats) | |
# in directory to *.gif | |
# At the end, ask for deletion of origina video | |
ffmpeg -i "$(ls -dt *.webm | head -1)" \ | |
-filter_complex "fps=10,scale=1024:-1:flags=lanczos" screencast.gif && | |
rm -i "$(ls -dt *.webm | head -1)" |
This file contains hidden or 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
/** | |
* Locations.js | |
* | |
* @description :: TODO: You might write a short summary of how this model works and what it represents here. | |
* @docs :: http://sailsjs.org/#!documentation/models | |
*/ | |
module.exports = { | |
seedData:[ |
This file contains hidden or 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
http = require('http') | |
### | |
Usage: | |
coffee index.coffee 3000 | |
### | |
server = http.createServer (req, res) -> | |
console.log "\n\nHEADERS:\n", req.headers | |
req.on 'data', (data) -> |
This file contains hidden or 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 | |
### | |
# Merge commits or branches as GitHub Pull Requests | |
# | |
# Usage: ./merge-pr.sh COMMIT PRNUMBER BRANCHNAME | |
# | |
# COMMIT: Commit or branch name to merge | |
# PRNUMBER: Number of the pull request being merged (used in commit message) | |
# BRANCHNAME: Branch name being merged (used in commit message) |
This file contains hidden or 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 | |
convert image-original.jpg -weight 900 -pointsize 400 -strokewidth 8 \ | |
-draw "gravity north stroke black fill white text 0,200 'DO NOT' " \ | |
-draw "gravity south stroke black fill white text 0,200 'PANIC' " \ | |
image-meme.jpg |
This file contains hidden or 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
define 'components/singleton', [], -> | |
### | |
Singleton class | |
### | |
class Singleton extends Backbone.View | |
# @static | |
@getInstance = -> | |
@_instance ?= new @ |
This file contains hidden or 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
<?php | |
/** | |
* This is a proposal for a new PHP test framework, | |
* based on the Mocha (http://mochajs.org/) dsl | |
* | |
* ## Features | |
* | |
* * Simple, easy to read | |
* * Non object oriented tests | |
* * Extensible |
This file contains hidden or 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
http = require 'http' | |
through = require 'through' | |
XmlStream = require 'xml-stream' | |
http.get 'http://example.com/file.xml', (res) -> | |
res.setEncoding 'utf-8' | |
res.on 'error', console.error | |
# create a stream to clean non-ascii characters, because | |
# XmlStream fails to parse XMLs with some chars (pasted from MS Word, mostly) |