Skip to content

Instantly share code, notes, and snippets.

View yuchan's full-sized avatar

Yusuke Ohashi yuchan

View GitHub Profile
//: A UIKit based Playground for presenting user interface
/// Copyright 2018 Yusuke Ohashi
///
/// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT O
#!/usr/bin/env bash
# http://stackoverflow.com/a/242550
BASEDIR=$(dirname "$0")
echo "$BASEDIR"
#!/bin/bash
git fetch origin --prune
for branch in $(git branch -r --list --merged | grep -v "develop" | grep -v "master" | sed -e 's/[A-z]*\///'); do git push origin :${branch}; done;
box: phusion/passenger-ruby22
build:
steps:
- bundle-install
- script:
name: jekyll-octopress
code: |
bundle exec jekyll build
deploy:
steps:
# coding: utf-8
# before execute this script, please install mechanize.
# [sudo] gem install mechanize --no-document
# and run!
# ruby url_encoded_list.rb
require 'mechanize'
require 'cgi'
require 'pp'

Keybase proof

I hereby claim:

  • I am yuchan on github.
  • I am yusuke (https://keybase.io/yusuke) on keybase.
  • I have a public key whose fingerprint is B8D0 6974 05CD 4CF5 7ED1 03C8 2A06 5688 A0FB 3B4A

To claim this, I am signing this object:

@yuchan
yuchan / .htaccess
Last active February 23, 2016 14:02
CodeIgniter Template
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
@yuchan
yuchan / .gitignore
Last active October 12, 2015 06:39
My Base Vagrantfile
.vagrant
@yuchan
yuchan / gulpfile.coffee
Created August 14, 2015 18:55
Sample Gulpfile for Browserify and React
gulp = require 'gulp'
browserify = require 'browserify'
source = require 'vinyl-source-stream'
reactify = require 'reactify'
watchify = require 'watchify'
_ = require 'lodash'
customOpts =
entries: ['./src/main.js'],
transform: [reactify]
#! /usr/bin/env ruby
#
class Val
@@name = {}
attr_accessor :key
def initialize(key)
@@name[key] = key # 便宜上
@key = key