Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View incheon's full-sized avatar

Tomohiro Imaizumi incheon

View GitHub Profile
@udzura
udzura / tutorial.md
Created June 2, 2014 03:31
Hubot + CoffeeScript ではじめるやわらかプログラミング入門

やわらかプログラミング入門

  • Hubot であそぼう


始めに、地図を描く

@YuukiTsuchida
YuukiTsuchida / UnixTime
Created May 23, 2014 06:20
C#でのUnixTime
public static class UnixTime
{
private static readonly DateTime UNIX_EPOCH = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
/*===========================================================================*/
/**
* 現在時刻からUnixTimeを計算する.
*
* @return UnixTime.
*/
@ikkou
ikkou / Boxstarter.md
Last active December 28, 2018 05:32
Boxstarter

Windowsでも開発環境を一瞬で構築したい!

未開封のWindows PCと一緒に手渡された環境構築マニュアル、1つ1つ手作業で進めるだけで初日が終わってしまった、そんな時間の無駄を省く為のドキュメント。

コマンドプロンプトを起動

WindowsRを同時に押して、cmdと入力、Enterを押下

chocolateyのインストール

@23maverick23
23maverick23 / font_awesome.rb
Last active January 30, 2022 11:38
Jekyll: Font Awesome icons Liquid tag
##
# The MIT License (MIT)
#
# Copyright (c) 2014 Ryan Morrissey
#
# 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
function! s:separate_defenition_to_each_filetypes(ft_dictionary) "{{{
let result = {}
for [filetypes, value] in items(a:ft_dictionary)
for ft in split(filetypes, ",")
if !has_key(result, ft)
let result[ft] = []
endif
call extend(result[ft], copy(value))
@jasonmadigan
jasonmadigan / 404_finder.rb
Created August 24, 2012 09:55
404 Finder - Simple Ruby site crawler, finds 404s
#!/usr/bin/env ruby
# Simple 404 finder
require 'rubygems'
require 'anemone'
url = ARGV[0]
if url.nil?
@them0nk
them0nk / rspec_rails_cheetsheet.rb
Created March 23, 2012 03:39
Rspec Rails cheatsheet (include capybara matchers)
#Model
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
#Rendering
response.should render_template(:index)
#Redirecting
response.should redirect_to(movies_path)
@benjamincharity
benjamincharity / Local Fallback for jQuery and Modernizr
Created January 6, 2012 17:31
Include jQuery and Modernizr from a CDN and add local fallbacks in case the CDN fails. Versions written in HTML and HAML.
HTML
=====
<script type='text/javascript'>
window.jQuery || document.write('<script src="js/jquery-1.7.1.js">\x3C/script>')
</script>
<script src='http://cdnjs.cloudflare.com/ajax/libs/modernizr/2.0.6/modernizr.min.js' type='text/javascript'></script>
<script type='text/javascript'>
window.Modernizr || document.write('<script src="js/modernizr-2.0.6.js">\x3C/script>')
</script>
@pathawks
pathawks / meta.html
Last active May 20, 2020 19:27
Open Graph for Jekyll
{% if include.content %}
<meta property="{{ include.property }}" content="{{ include.content }}" />
{% endif %}
@zhengjia
zhengjia / capybara cheat sheet
Created June 7, 2010 01:35
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')