So you want to have pretty URLs with no trailing slash or .html
like:
http://mysite.com/blog/my-new-kitten
not like:
http://mysite.com/blog/my-new-kitten/
or
source :rubygems | |
gem 'capybara' | |
gem 'rack' | |
gem 'rspec' |
module.exports = (grunt) -> | |
# configuration | |
grunt.initConfig | |
# grunt sass | |
sass: | |
compile: | |
options: | |
style: 'expanded' |
module.exports = function(grunt) { | |
var matches = grunt.file.expand('scripts/template-scripts/**/index.js'); | |
var requirejsOptions = {}; | |
if (matches.length > 0) { | |
for (var x = 0; x < matches.length; x++) { | |
var path = matches[x].replace(/\/index\.js/, ''); | |
requirejsOptions['task' + x] = { | |
"options": { | |
"baseUrl": "./", |
require 'rubygems' | |
require 'twitter' | |
# see https://github.com/sferik/twitter | |
def twitter_client | |
Twitter::REST::Client.new do |config| | |
config.consumer_key = "XXXXXX" | |
config.consumer_secret = "XXXXXX" | |
config.access_token = "XXXXXX" |
So you want to have pretty URLs with no trailing slash or .html
like:
http://mysite.com/blog/my-new-kitten
not like:
http://mysite.com/blog/my-new-kitten/
or
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
# | |
# A little overlook of the Bash basics | |
# | |
# Usage: | |
# | |
# Author: J. Le Coupanec | |
# Date: 2014/11/04 |
#Inject javascript into HTML pages from console
An easy way to inject Javascripts into the current loaded dom using the developer console in chrome.
jQuery
var script = document.createElement('script');
script.src = 'http://code.jquery.com/jquery-1.7.2.min.js';
=LOWER(CLEAN(SUBSTITUTE(TRIM(C2)," ","-"))) |
/* | |
* Viktor's Roam gallery PoC v0.2 | |
* author: @ViktorTabori | |
* | |
* How to install it: | |
* - go to page [[roam/js]] | |
* - create a node with: {{[[roam/js]]}} | |
* - create a clode block under it, and change its type from clojure to javascript | |
* - allow the running of the javascript on the {{[[roam/js]]}} node | |
* - reload Roam |
module.exports = { | |
hexStringToIntArray: function(str) { | |
var res = [] | |
for(var i = 0; i < str.length; i += 2) { | |
res.push(parseInt(str.substring(i, i+2), 16)) | |
} | |
return res | |
}, | |
byteArrayToHexString: function(array) { |