Skip to content

Instantly share code, notes, and snippets.

Brice M. bricemaurin

Block or report user

Report or block bricemaurin

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
makmanalp /
Last active Aug 22, 2019
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).

View xpath-cheatsheet.js
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// 0. XPath Examples.
// More:
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class
n1k0 /
Last active Apr 1, 2017
A simple CasperJS script to fetch google suggestions from a partial search

CasperJS Google Suggest

The script:

/*global casper:true*/
var casper = require('casper').create({
    pageSettings: {
        userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Firefox/31.0"
Integralist / 1. sinatra-basic-with-comments.rb
Last active Nov 9, 2019
Create basic site using Ruby and Sinatra (and external templates)
View 1. sinatra-basic-with-comments.rb
#!/usr/bin/env ruby
install Sinatra: gem install sinatra
install Shotgun: gem install shotgun (this auto-reloads sinatra on every http request - which means every time you make a change in your code you don't have to stop then start sinatra)
To just run your code using Sinatra: ruby name-of-file.rb
To run your code using Shotgun (which is just Sinatra but with ability to auto-reload when changes are made to files): shotgun name-of-file.rb
The following examples are run using Shotgun and the URL is:
ScottPhillips / .htaccess
Created Feb 2, 2012
Common .htaccess Redirects
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php
#Redirect an entire site:
Redirect 301 /
#Redirect an entire site to a sub folder
Redirect 301 /
tomcritchlow / Google Docs Script
Created Apr 5, 2011
The Google Spreadsheets Script Used To Call Social Media APIs
View Google Docs Script
function FBshares(url) {
var jsondata = UrlFetchApp.fetch(""+url);
var object = Utilities.jsonParse(jsondata.getContentText());
return object.shares;
function Tweets(url) {
var jsondata = UrlFetchApp.fetch(""+url);
var object = Utilities.jsonParse(jsondata.getContentText());
return object.count;
You can’t perform that action at this time.