Skip to content

Instantly share code, notes, and snippets.

View iwatakeshi's full-sized avatar
📚
Always learning

Takeshi iwatakeshi

📚
Always learning
View GitHub Profile
[Desktop Entry]
Version=1.0
Name=Google Chrome
# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
GenericName=Web Browser
GenericName[ar]=متصفح الشبكة
GenericName[bg]=Уеб браузър
GenericName[ca]=Navegador web
GenericName[cs]=WWW prohlížeč
#Note: Make sure all changes in your working directory have
#been commited and pushed to the repo!
#List the existing branches
git branch -a
#Create a new branch and switch to it
git checkout -b [name of new branch]
#Switch to existing branch (without brackets)
/**
* AuthController
*
* @module :: Controller
* @description :: Contains logic for handling auth requests.
*/
var passport = require('passport');
var GoogleStrategy = require('passport-google').Strategy;
@iwatakeshi
iwatakeshi / gist:665d22150b7146d417fb
Last active August 29, 2015 14:07
Sublime Text for Windows Command Line

###Instructions

  • Open cmd prompt
//Click Start then type 'cmd'. Then hit ctrl + shift + enter to run as admin.
  • Add Sublime to PATH
//Type sysdm.cpl into cmd prompt and open system settings.
//Create a new system variable called SUBLIME
//Add the system variable to PATH by adding %SUBLIME%; after the last ';'
@iwatakeshi
iwatakeshi / http.js
Last active August 29, 2015 14:07
gengo for Sails
/**
* HTTP Server Settings
* (sails.config.http)
*
* Configuration for the underlying HTTP server in Sails.
* Only applies to HTTP requests (not WebSockets)
*
* For more information on configuration, check out:
* http://sailsjs.org/#/documentation/reference/sails.config/sails.config.http.html
*/
@iwatakeshi
iwatakeshi / library.js
Created November 16, 2014 04:50
Javascript library template for the Browser and Node.js Bootstrap
/*jslint node: true, forin: true, jslint white: true, newcap: true*/
/*
* library
* author : Takeshi Iwana
* https://github.com/iwatakeshi
* license : MIT
* Code heavily borrowed from Adam Draper
* https://github.com/adamwdraper
*/
@iwatakeshi
iwatakeshi / en-us.js
Last active August 29, 2015 14:11
A template Javascript locale factory for toki.js
// toki.js locale configuration
// locale : afrikaans (af)
// author : Werner Mollentze : https://github.com/wernerm
/*jslint node: true, forin: true, white: true, newcap: true*/
/*jslint browser:true */
/*global define*/
(function(factory) {
if (typeof define === 'function' && define.amd) {
define(['toki'], factory); // AMD
function subdomain(options) {
// options?
options = options || {};
if (!options.base) {
throw new Error('options.base required!');
} else {
options.removeWWW = options.removeWWW || false;
options.debug = options.debug || false;
@iwatakeshi
iwatakeshi / .js
Created April 8, 2015 22:09
gengo.js JSHint Workflow
{
/*
* ENVIRONMENTS
* =================
*/
// Define globals exposed by modern browsers.
"browser": true,
// Define globals exposed by jQuery.
@iwatakeshi
iwatakeshi / mongo.bash
Created April 22, 2015 02:02
Create a Windows service for MongoDB
# Create directories
mkdir c:\mongo\db
mkdir c:\mongo\config
mkdir c:\mongo\log
# Create a configuration file
# in c:\mongo\config\ as
# 'mongod.cfg' and paste:
#|==================================|
#| logpath=C:\mongo\log\mongodb.log |