Skip to content

Instantly share code, notes, and snippets.

View kamiyam's full-sized avatar
🏠
Working from home

kamiyam kamiyam

🏠
Working from home
View GitHub Profile
@kamiyam
kamiyam / 0_reuse_code.js
Created March 20, 2014 04:59
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@kamiyam
kamiyam / Gruntfile.coffee
Created April 26, 2014 07:39
Gruntfile for Node.js Framework Express
"use strict"
LIVERELOAD_PORT = 35729
proxySnippet = require("grunt-connect-proxy/lib/utils").proxyRequest
mountFolder = folderMount = (connect, base) ->
connect["static"] require("path").resolve(base)
listen = 8000
server = 3000
module.exports = (grunt) ->
@kamiyam
kamiyam / Gruntfile.coffee
Last active August 29, 2015 14:00
Grunt - Middleman Cooperation
module.exports = (grunt)->
pkg = grunt.file.readJSON 'package.json'
for taskName of pkg.devDependencies
if taskName.substring(0,6) == 'grunt-'
grunt.loadNpmTasks taskName
grunt.initConfig
@kamiyam
kamiyam / uploader.coffee
Created September 26, 2014 10:31
File Upload form data multiple for Angular
do(d=document)->
app = angular.module myApp, []
app.controller "uploadCtrl", ["$scope", "$http", ($scope, $http)->
$scope.$data = {
userId: "ID"
userName: "USER_NAME"
userMail: "sample@example.com"
receiveMail: "sample@example.com"
downloadPassword: "hogehoge"
public override void TouchesBegan(NSSet touches, UIEvent evt)
{
var touch = touches.AnyObject as UITouch;
Console.Out.WriteLine("TouchesBegan:" + touch.TapCount);
if (touch.TapCount == 2)
{
Console.Out.WriteLine("TouchesBegan:SingleTap Cancel");
//シングルタップ時の処理キャンセル
}
PointF startLoc;
int iX_Min = 12;
int iY_Max = 4;
public override void TouchesBegan(NSSet touches, UIEvent evt)
{
var touch = touches.AnyObject as UITouch;
Console.Out.WriteLine("TouchesBegan:" + touch.TapCount);
public override void DidRotate( UIInterfaceOrientation fromInterfaceOrientation )
{
Console.WriteLine("DidRotate-oreginal: " + fromInterfaceOrientation);
Console.WriteLine("DidRotate-now: " + InterfaceOrientation);
switch ( InterfaceOrientation )
{
case UIInterfaceOrientation.LandscapeLeft:
case UIInterfaceOrientation.LandscapeRight:
//Landscape
// JavaScript Document
(function(d){
setTimeout( function(){
var js, id = "facebook-jssdk", fbroot = "fb-root";
if ( d.getElementById(id) ) { return; }
if ( d.getElementById( fbroot ) ){
js = d.createElement('script'); js.id = id; js.async = true;
@kamiyam
kamiyam / Gruntfile.js
Last active December 14, 2015 00:09
grunt.js 0.4 beginning...
'use strict';
var path = require('path');
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var folderMount = function folderMount(connect, point) {
return connect.static(path.resolve(point));
};
module.exports = function (grunt) {
@kamiyam
kamiyam / Gruntfile.js
Last active December 14, 2015 01:59
grunt-xxxxx auto all load setting...
module.exports = function (grunt) {
grunt.initConfig({
xxx: xxx
//......
});
// load all grunt tasks
require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);