Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
class PagesController < ApplicationController | |
before_filter :login_required, :except => [ :show ] | |
# GET /pages | |
# GET /pages.xml | |
def index | |
@pages = Page.find(:all) | |
respond_to do |format| | |
format.html # index.html.erb |
require 'cgi' | |
def html2text html | |
text = html. | |
gsub(/( |\n|\s)+/im, ' ').squeeze(' ').strip. | |
gsub(/<([^\s]+)[^>]*(src|href)=\s*(.?)([^>\s]*)\3[^>]*>\4<\/\1>/i, | |
'\4') | |
links = [] | |
linkregex = /<[^>]*(src|href)=\s*(.?)([^>\s]*)\2[^>]*>\s*/i |
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
/* Cranium MVC | |
* A minimalist MVC implementation written for | |
* demonstration purposes at my workshops | |
* http://addyosmani.com | |
* Copyright (c) 2012 Addy Osmani; Licensed MIT */ | |
var Cranium = Cranium || {}; | |
// Set DOM selection utility |
/************************************************************************************************* | |
UTF-8 validation test | |
UTF-8 is used for encoding text, which means, mapping the bytes in a file to meaningful characters. | |
ASCII is the classic, once ubiquitous encoding in the western world. It uses a single byte per | |
character, and uses only the lower 7 bits of that byte. It can only represent the characters on a | |
US keyboard (as well as tab and carriage return etc). Other encodings exist which also use a single | |
byte per character, but use all 8 bits, like ISO-8859-1, or use multible bytes per character, like | |
UCS-32 which always uses 4 bytes per character. These encodings can represent many more characters, | |
such as accented ones. |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
based on rage-quit support for bash
Put the files below inside ~/.oh-my-zsh/custom/plugins/fuck
Also chmod a+x
the flip
command.
/** | |
* LL(1) parser. Building parsing table, part 1: First and Follow sets. | |
* | |
* NOTICE: see full implementation in the Syntax tool, here: | |
* https://github.com/DmitrySoshnikov/syntax/blob/master/src/sets-generator.js | |
* | |
* by Dmitry Soshnikov <[email protected]> | |
* MIT Style License | |
* | |
* An LL(1)-parser is a top-down, fast predictive non-recursive parser, |
Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.
I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.
This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.
You are encouraged to fork this and modify it to your heart's content to match your own needs.