Skip to content

Instantly share code, notes, and snippets.

View rskull's full-sized avatar

Ryota Mogi rskull

View GitHub Profile
@MicahElliott
MicahElliott / colortrans.py
Created November 29, 2010 07:57
Convert values between RGB hex codes and xterm-256 color codes.
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code
@rskull
rskull / gist:1326182
Created October 30, 2011 17:49
今月の最終日を取得する
//今月の最終日取得
function lastday () {
var now = new Date();
var y = now.getFullYear();
var m = now.getMonth();
for (i=27;i<=32;i++) {
var check = new Date(y, m, i);
if (check.getMonth() != m) {
return i - 1;
}
Jenkins × PHP環境構築の巻
■目的
PHP環境に対応したJenkins設定を行い、
コミットされる度にサーバ上でのPHPUnitの実行 及び
カバレッジレポート出力を"全自動"で行えるようにすること。
1) PHP Pear系のインストール
sudo pear channel-discover pear.phing.info
sudo pear channel-discover pear.pdepend.org
@azu
azu / js.md
Last active June 23, 2024 17:38
JavaScriptのレベル別書籍のまとめ

前提: 完成していて、比較的支持を集めていて、JavaScriptを中心にした書籍 (DOM APIよりは言語を中心とした内容)

追記: JavaScriptの入門書 #jsprimerを書いている

最初からES2015で学ぶことを前提にした初心者〜中級者向けのJavaScript本がなかったので書いてる。 ES2015でJavaScriptという言語のコア部分は大きく変わったので、それを前提とした内容にする予定。

@stan229
stan229 / index.js
Created March 14, 2017 15:12
React Navigation and Redux example
import React, { Component } from "react";
import { Text } from "react-native";
import { Provider, connect } from "react-redux";
import { StackNavigator, addNavigationHelpers } from "react-navigation";
import Routes from "./config/routes";
import getStore from "./store";
const AppNavigator = StackNavigator(Routes);
@chourobin
chourobin / 0-bridging-react-native-cheatsheet.md
Last active June 28, 2024 20:49
React Native Bridging Cheatsheet
@zerobias
zerobias / redux-act.js
Created January 8, 2018 23:01
Flow redux-act typings for making redux stores, entirely typed by action's payloads
declare module 'redux-act' {
/**
* Single "action" as it referenced from classic redux
* @typedef {{ type: string, payload: P }} Act.<P>
* @template P
*/
declare export
type Act</*::+*/P = mixed> = {
@GuimDev
GuimDev / export.js
Last active July 9, 2019 17:40 — forked from turtlepod/export.js
Export-Import GitHub Labels
/**
* Export Github Labels
****************************************************
*
* FIREFOX STEP BY STEP:
* 1. Open the labels manage page e.g github.com/user/repo/lebels
* 2. Open Scratch Pad (SHIFT + F4)
* 3. Paste the code below and run
* 4. Inspect Element > Console ( To read console log)
* 5. Copy it the console.log results
@cdlhub
cdlhub / import-github-labels.md
Last active December 22, 2021 14:56
Script to import labels to Github issue page
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active July 20, 2024 05:29
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}