Skip to content

Instantly share code, notes, and snippets.

View kyohei8's full-sized avatar
๐Ÿ’ญ
๐Ÿ•ต๏ธโ€โ™‚๏ธ

kyohei tsukuda kyohei8

๐Ÿ’ญ
๐Ÿ•ต๏ธโ€โ™‚๏ธ
View GitHub Profile
@jkresner
jkresner / Procfile
Created April 13, 2013 09:05
Deploy brunch to heroku
web: ./node_modules/.bin/coffee app.coffee
@japboy
japboy / jade-ftw.md
Last active October 23, 2023 11:18
Jade ใซใคใ„ใฆใ€‚

Jade FTW

ใ“ใ‚“ใซใกใฏใ€‚ไปŠๅ›žใฏ็พๅฎŸ้€ƒ้ฟใ‚’ๅ…ผใญใฆ Jade ใฎ็ด ๆ™ดใ‚‰ใ—ใ•ใ‚’ใŠไผใˆใ—ใŸใ„ใจๆ€ใ„ใพใ™ใ€‚

Jade ใจใฏไฝ•ใ‹

[Jade][0] ใฏ JST (JavaScript Templates) ใฎไธ€ใคใงใ‚ใ‚Šใ€HTML ใ‚’ๆ›ธใใŸใ‚ใฎ[่ปฝ้‡ใƒžใƒผใ‚ฏใ‚ขใƒƒใƒ—่จ€่ชž][1] ใงใ‚ใ‚‹ [Haml][2] ใซๅฝฑ้Ÿฟใ‚’ๅ—ใ‘ใŸ JavaScript ใƒ†ใƒณใƒ—ใƒฌใƒผใƒˆใ‚จใƒณใ‚ธใƒณใงใ‚‚ใ‚ใ‚Šใพใ™ใ€‚

@ympbyc
ympbyc / FunctionalJs.md
Last active November 2, 2024 00:52
Functional JavaScript

Functional JavaScript

2013 Minori Yamashita [email protected]

-- ใ“ใ“ใซใ‚ใชใŸใฎๅๅ‰ใ‚’่ฟฝ่จ˜ --

็›ฎๆฌก

@6174
6174 / Random-string
Created July 23, 2013 13:36
Generate a random string in JavaScript In a short and fast way!
//http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript
Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15);
@michaelparenteau
michaelparenteau / config.ru
Last active January 29, 2016 05:55
Basic Auth Middleman & Heroku
# This is a snippet to add to middleman's config.ru file if you want to add basic auth to your middleman app on heroku
# NOTE: you need to stick this above the build script like shown below
use Rack::Auth::Basic, "Restricted Area" do |username, password|
[username, password] == ['username', 'password']
end
# This part below is just what builds the static site. you only need to add lines 4 - 6 above any build command like shown below.
use Rack::TryStatic, :root => "build", :urls => %w[/], :try => ['.html', 'index.html', '/index.html']
@keit
keit / gist:6288233
Last active February 22, 2018 15:01
Rails4 + Bower + Bootstrap set-up
This document is outdated.
You should read David Bryant Copeland's excellent online book: http://angular-rails.com/crud_recipe.html
---------------------------------------------------------------------------------------------------------------
I think it's better to install javascript/css libraries using Bower rather than gem which is Ruby packager.
1. Install Rails 4 and create a new project.
2. Install bower(Note you need to install node first.)
sudo npm install -g bower
@fregante
fregante / TimelineLite.addDelay.js
Last active December 24, 2018 11:53
Method to add delays at any position in Greensocks TimelineLite and TimelineMax (Javascript GSAP)
/**
* Add a delay at the end of the timeline (or at any label)
* @param {number} delay Seconds to wait
* @param {string} position Label name where to start the delay
*
* Usage: tl.addDelay(4); //easy!
*/
TimelineLite.prototype.addDelay = function (delay, position) {
var delayAttr;
if(typeof delay === 'undefined' || isNaN(delay)){
@didats
didats / nationality.html
Created December 28, 2013 00:00
Nationality List in HTML Dropdown
<select name="nationality">
<option value="">-- select one --</option>
<option value="afghan">Afghan</option>
<option value="albanian">Albanian</option>
<option value="algerian">Algerian</option>
<option value="american">American</option>
<option value="andorran">Andorran</option>
<option value="angolan">Angolan</option>
<option value="antiguans">Antiguans</option>
<option value="argentinean">Argentinean</option>
@joyrexus
joyrexus / README.md
Created March 27, 2014 18:17
groupby and countby for python

groupby and countby for python

Python has the standard methods for applying functions over iterables, viz. map, filter, and reduce.

For example, we can use filter to filter some numbers by some criterion:

even = lambda x: x % 2 is 0
odd  = lambda x: not even(x)
data = [1, 2, 3, 4]
@fujimura
fujimura / Rakefile
Last active August 29, 2015 14:01
2014ๅนด็‰ˆใƒ•ใƒญใƒณใƒˆใ‚จใƒณใƒ‰้–‹็™บใฎใ‚ใŸใ‚Šใพใˆ @ EdTech CTO Night!
task :compile do
`pandoc -t slidy -s edtech_cto_night.md -o slide.html`
end
task :open do
`open slide.html`
end
task :watch do
require 'listen'