Skip to content

Instantly share code, notes, and snippets.

.border-radius( @radius: 3px ) {
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
border-radius: @radius;
}
.outline-radius( @radius: 3px ) {
-webkit-outline-radius: @radius;
-moz-outline-radius: @radius;
outline-radius: @radius;

Advanced Rest Client with OAuth2orize

For this to work you will need to install the Advanced Rest Client for some of these steps. Of course you will need to install OAuth2orize as well.

Run the oauth2orize provider/server example which does server-side OAuth flow:

cd oauth2orize\examples\express2
node app.js

Google Chrome

Windows

  • Go to: %localappdata%\google\chrome\user data\default\Local Storage

Mac OS X

  • Go to: Application Support -> Google -> Chrome -> Default -> Local Storage

Linux

  • Open Places -> Home Folder
@IskenHuang
IskenHuang / img.js
Last active December 22, 2015 06:59
/**
* This is simple transfer image to data uri(base64 encode) nodejs command line tool
*
* require
* install nodejs v0.8+
*
* how to use
* node img YOUR_IMAGE_FILE_PATH
*
* sample
@IskenHuang
IskenHuang / uglify.js
Last active December 22, 2015 08:49
make html scripts merge to one uglify script
var fs = require('fs'),
sys = require('sys'),
exec = require('child_process').exec,
staticFolder = 'static',
jsFolder = 'js',
jsRoot = __dirname + '/' + jsFolder + '/',
htmlRoot = __dirname+ '/../application/views',
suffix = '.min',
@IskenHuang
IskenHuang / imageToUri.coffee
Created September 9, 2013 15:08
image in css, html from url to uri
fs = require('fs')
cheerio = require('cheerio')
staticFolder = 'static'
imgFolder = 'img'
cssFolder = 'css'
cssRoot = __dirname + '/' + cssFolder
htmlFolder = 'views'
htmlRoot = __dirname + '/../application/' + htmlFolder
@IskenHuang
IskenHuang / cssInsertToHtml.coffee
Created September 9, 2013 16:13
styles link insert to html head
fs = require('fs')
cheerio = require('cheerio')
staticFolder = 'static'
cssFolder = 'css'
cssRoot = __dirname + '/' + cssFolder
htmlFolder = 'views'
htmlRoot = __dirname + '/../application/' + htmlFolder
/*timestamp and datacreate
don't forget to set validate columns to ONLY DATA_VALUES for datacreate and timstamp columns
Do not allow to enter not valid data!
I don't know how to do this inside the script.*/
function onEdit(e) {
//########################## SETUP BEGIN ###################################
var dc = 'datacreate'; //set datacreate_column_header
var ts = 'timestamp'; //set timestamp_column_header
// var dc_fontcolor = '#808080'; //set font-color in HEX or CSS mode for datacreate column
// var ts_fontcolor = '#808080'; //set font-color in HEX or CSS mode for timestamp column

page

137 ~ 152

$location

The $location service is a wrapper around the window.location that is present in any browser.

global status

The minute you have global state in your application, testing, maintaining and working with it becomes a hassle.

@IskenHuang
IskenHuang / flash.html
Created September 30, 2013 06:27
include flash in html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<title>Untitled-1</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css" media="screen">
html, body { height:100%; background-color: #ffffff;}
body { margin:0; padding:0; overflow:hidden; }
#flashContent { width:100%; height:100%; }
</style>