Skip to content

Instantly share code, notes, and snippets.

Avatar

Keita Urashima ursm

  • Sapporo, Japan
  • Twitter @ursm
View GitHub Profile
@dennishall1
dennishall1 / split-svg-spritesheet.js
Created Mar 17, 2016
Split SVG Spritesheet into individual SVG files
View split-svg-spritesheet.js
var fs = require('fs');
var path = require('path');
var markup = fs.readFileSync('sprite.svg').toString();
var lines = markup.split(/\n/g);
var symbols = {};
var currentSymbol = null;
@voluntas
voluntas / webrtc.rst
Last active Dec 1, 2022
WebRTC コトハジメ
View webrtc.rst
@yattom
yattom / Crypto.java
Last active Jan 8, 2021
AES暗号・復号をJavaとRubyで実装したサンプルです。言語間で相互に暗号化・復号ができます。
View Crypto.java
import java.security.AlgorithmParameters;
import java.security.Key;
import java.security.SecureRandom;
import javax.crypto.*;
import javax.crypto.spec.*;
import java.security.spec.*;
import org.apache.commons.codec.binary.Base64;
@jsteiner
jsteiner / projections.json
Last active Nov 17, 2017
Example Rails.vim projections for an Ember.js project.
View projections.json
{
"app/assets/javascripts/models/*.coffee": {
"command": "jmodel",
"alternate": "spec/javascripts/models/%s_spec.coffee",
"template": "App.%S = DS.Model.extend"
},
"app/assets/javascripts/controllers/*_controller.coffee": {
"command": "jcontroller",
"alternate": "spec/javascripts/controllers/%s_spec.coffee",
@tomdale
tomdale / gist:3981133
Last active Nov 26, 2019
Ember.js Router API v2
View gist:3981133

WARNING

This gist is outdated! For the most up-to-date information, please see http://emberjs.com/guides/routing/!

It All Starts With Templates

An Ember application starts with its main template. Put your header, footer, and any other decorative content in application.handlebars.

<header>
@andykram
andykram / .vimrc
Created May 21, 2012
Using rails.vim to make backboning with the asset pipeline easier
View .vimrc
" Shortcuts for backbone.js via the asset pipeline
autocmd User Rails Rnavcommand bbmodel app/assets/javascripts/backbone/models -suffix=.js.coffee -glob=*
autocmd User Rails Rnavcommand bbhelper app/assets/javascripts/backbone/helpers -suffix=.js.coffee -glob=*
autocmd User Rails Rnavcommand bbmixin app/assets/javascripts/backbone/mixins -suffix=.js.coffee -glob=*
autocmd User Rails Rnavcommand bbrouter app/assets/javascripts/backbone/routers -suffix=.js.coffee -glob=*
autocmd User Rails Rnavcommand bbtemplate app/assets/javascripts/backbone/templates -suffix=.jst.hbs -glob=**/*
autocmd User Rails Rnavcommand bbview app/assets/javascripts/backbone/views -suffix=.js.coffee -glob=**/*
" Shortcuts for less.js via the asset pipeline
autocmd User Rails Rnavcommand less app/assets/stylesheets/less -suffix=.less -glob=**/*
@logankoester
logankoester / rails.vim
Created Oct 4, 2011
Useful Rails.vim macros
View rails.vim
" Factories and Configuration
Rnavcommand config config -suffix=.yml -default=application
Rnavcommand factory spec/factories test/factories -suffix=.rb -default=model()
" Backbone
Rnavcommand bmodel app/assets/javascripts/backbone/models -suffix=.coffee -default=model()
Rnavcommand bview app/assets/javascripts/backbone/views -suffix=.coffee
" Apotomo Widgets (Cells)
Rnavcommand widget app/widgets -suffix=_widget.rb
View otto.rb
require 'drb'
require 'pp'
require 'net/https'
require 'oauth'
require 'json'
class JSONStream
def initialize(drop)
@buf = ''
@drop = drop
View classy_git.md