Skip to content

Instantly share code, notes, and snippets.

View toidang92's full-sized avatar

Bá Tới toidang92

  • Hồ Chí Minh City
  • 15:06 (UTC +07:00)
  • LinkedIn in/toidang92
View GitHub Profile

A small sampling of external projects initially built for Ember use but designed to be used standalone:

@toidang92
toidang92 / webcrawler.js
Created April 10, 2016 08:02 — forked from amoilanen/webcrawler.js
Simple PhantomJS-based web crawler library
//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov [email protected] 2012
//UPDATE: This gist has been made into a Node.js module and now can be installed with "npm install js-crawler"
//the Node.js version does not use Phantom.JS, but the API available to the client is similar to the present gist
(function(host) {
function Crawler() {
this.visitedURLs = {};
};
$bc-500px: #0099e5;
$bc-500px-2: #ff4c4c;
$bc-500px-3: #34bf49;
$bc-about-me: #00405d;
$bc-about-me-2: #062f3c;
$bc-about-me-3: #2b82ad;
$bc-about-me-4: #cc7a00;
@toidang92
toidang92 / array_validator.rb
Created April 19, 2016 10:22
Validator for Rails array columns
# Usage:
#
# validates :array_column, array: { length: { is: 20 }, allow_blank: true }
# validates :array_column, array: { numericality: true }
#
# It also supports sliced validation
#
# validates :array_column, array: { presence: true, slice: 0..2 }
class ArrayValidator < ActiveModel::EachValidator
// jquery invert plugin
// by paul irish
// some (bad) code from this css color inverter
// http://plugins.jquery.com/project/invert-color
// some better code via Opera to inverse images via canvas
// http://dev.opera.com/articles/view/html-5-canvas-the-basics/#insertingimages
// and some imagesLoaded stuff from me
// http://gist.github.com/268257
@toidang92
toidang92 / phantomjs_facebook.js
Created April 29, 2016 15:37 — forked from ecin/phantomjs_facebook.js
Log into Facebook with phantomJS
console.log("got here");
var page = require('webpage').create();
page.onConsoleMessage = function(msg) {
console.log(msg);
};
page.open("http://facebook.com", function(status) {
if ( status === "success" ) {
@toidang92
toidang92 / comparison.md
Created May 4, 2016 09:03 — forked from makmanalp/comparison.md
Angular vs Backbone vs React vs Ember notes

Note: these are pretty rough notes I made for my team on the fly as I was reading through some pages. Some could be mildly inaccurate but hopefully not terribly so. I might resort to convenient fiction & simplification sometimes.

My top contenders, mostly based on popularity / community etc:

  • Angular
  • Backbone
  • React
  • Ember

Mostly about MVC (or derivatives, MVP / MVVM).

@toidang92
toidang92 / temporary-email-address-domains
Created May 5, 2016 10:12 — forked from adamloving/temporary-email-address-domains
A list of domains for disposable and temporary email addresses. Useful for filtering your email list to increase open rates (sending email to these domains likely will not be opened).
0-mail.com
0815.ru
0clickemail.com
0wnd.net
0wnd.org
10minutemail.com
20minutemail.com
2prong.com
30minutemail.com
3d-painting.com
<article class="hentry">
<header>
<h1 class="entry-title">But Will It Make You Happy?</h1>
<time class="updated" datetime="2010-08-07 11:11:03-0400" pubdate>08-07-2010</time>
<p class="byline author vcard">
By <span class="fn">Stephanie Rosenbloom</span>
</p>
</header>
<div class="entry-content">
/// Stripe builder
/// @author Hugo Giraudel
/// @param {Direction} $direction - Gradient direction
/// @param {List} $colors - List of colors
/// @output `background-image` if several colors, `background-color` if only one
@mixin stripes($direction, $colors) {
$length: length($colors);
@if $length > 1 {
$stripes: ();