Skip to content

Instantly share code, notes, and snippets.

@paulirish
paulirish / rAF.js
Last active July 19, 2024 19:50
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
@reorx
reorx / python_deployment.rst
Last active December 14, 2020 03:31
Python Deployment

This document is still a scratch

Python Deployment

Setup A Workplace

You’ll want a directory to do this in so that you don’t screw up your machine.

@bells17
bells17 / my_sublime_text_2_preferences.json
Last active August 25, 2016 05:09
個人用に作成したSublime Text 2 の設定ファイルです。
{
/*
* UI関係
*/
// カラー&スキーマ
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme", // カラー
"theme": "Soda Dark.sublime-theme", // スキーマ
// カーソルのスタイル ("smooth", "phase", "blink", "wide", "solid")
"caret_style": "smooth",
@cobyism
cobyism / gh-pages-deploy.md
Last active July 18, 2024 05:22
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@tkawa
tkawa / restful-towa-7.md
Created May 19, 2015 09:46
RESTful#とは勉強会7 ポイント

RESTful#とは勉強会7 2015.05.19

質問はTwitterへ #RESTudy をつけてどうぞ。

「Webを支える技術」第8章 ステータスコード (8.5 p.121〜)

重要な用語・概念

以前に出てきた用語が多いので、理解が不安なときはその都度前のページを振り返って復習しながら進みましょう。

@kkas
kkas / CSS Frameworks.md
Last active February 16, 2016 04:14
HTML and CSS
anonymous
anonymous / bonfire-title-case-a-sentence#.js
Created December 7, 2015 06:17
http://www.freecodecamp.com/kkas 's solution for Bonfire: Title Case a Sentence
// Bonfire: Title Case a Sentence
// Author: @kkas
// Challenge: http://www.freecodecamp.com/challenges/bonfire-title-case-a-sentence#
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function titleCase(str) {
var newStrAry = str.split(' ').map(function(word) {
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
});
anonymous
anonymous / bonfire-return-largest-numbers-in-arrays#.js
Created December 7, 2015 06:48
http://www.freecodecamp.com/kkas 's solution for Bonfire: Return Largest Numbers in Arrays
// Bonfire: Return Largest Numbers in Arrays
// Author: @kkas
// Challenge: http://www.freecodecamp.com/challenges/bonfire-return-largest-numbers-in-arrays#
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function largestOfFour(arr) {
// You can do this!
return arr.map(function(elemAry) {
return elemAry.sort(function(a, b) { return a - b;})[elemAry.length - 1];
});
anonymous
anonymous / bonfire-confirm-the-ending#.js
Created December 7, 2015 07:27
http://www.freecodecamp.com/kkas 's solution for Bonfire: Confirm the Ending
// Bonfire: Confirm the Ending
// Author: @kkas
// Challenge: http://www.freecodecamp.com/challenges/bonfire-confirm-the-ending#
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function end(str, target) {
// "Never give up and good luck will find you."
// -- Falcor
var subStrAry,
subLen,
anonymous
anonymous / bonfire-repeat-a-string-repeat-a-string#.js
Created December 8, 2015 01:48
http://www.freecodecamp.com/kkas 's solution for Bonfire: Repeat a string repeat a string
// Bonfire: Repeat a string repeat a string
// Author: @kkas
// Challenge: http://www.freecodecamp.com/challenges/bonfire-repeat-a-string-repeat-a-string#
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function repeat(str, num) {
// repeat after me
if (num < 0) {
return "";
}