Skip to content

Instantly share code, notes, and snippets.

View shinriyo's full-sized avatar

shinriyo shinriyo

View GitHub Profile
@EQuimper
EQuimper / clear.txt
Created June 16, 2017 16:17
React-Native clear Watchman + Cache
watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache
@mori-dev
mori-dev / payjp_checkout.js
Last active June 21, 2022 08:57
PAY.JP の Checkout 用の React.js コンポーネント
// @flow
import React, { Component } from 'react';
import { findDOMNode } from 'react-dom';
class PayjpCheckout extends Component {
constructor(props: Object) {
super(props);
this.windowAlertBackUp = window.alert;
this.script = document.createElement('script');
@k-hoshina
k-hoshina / interface.md
Created January 11, 2017 10:05
interface{}のはなし

interface{}のはなし

goのinterfaceとは

方の定義とか関数の引数(あるいは帰り値)でよく使ってる

type Car interface {
  run(int)
  stop() bool
@jgrodziski
jgrodziski / docker-aliases.sh
Last active April 30, 2024 17:46
Useful Docker Aliases
############################################################################
# #
# ------- Useful Docker Aliases -------- #
# #
# # Installation : #
# copy/paste these lines into your .bashrc or .zshrc file or just #
# type the following in your current shell to try it out: #
# wget -O - https://gist.githubusercontent.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb/raw/d84ef1741c59e7ab07fb055a70df1830584c6c18/docker-aliases.sh | bash
# #
# # Usage: #
@mborodov
mborodov / docker_aliases.sh
Last active December 7, 2020 13:08
Create docker-compose & docker aliases
#!/bin/bash
echo "alias dps='docker-compose ps'
alias dstart='docker-compose start'
alias dstop='docker-compose stop'
alias drestart='docker-compose restart'
alias dexec='docker exec -it docker_php_1'
alias dpull='docker pull'
alias dup='docker-compose up -d'" >> ~/.bash_profile;
echo "----Commands aliases for Docker\n";
@jmvrbanac
jmvrbanac / app.py
Created February 18, 2016 01:05
Using Jinja2 with Falcon
import os
import falcon
import jinja2
def load_template(name):
path = os.path.join('templates', name)
with open(os.path.abspath(path), 'r') as fp:
return jinja2.Template(fp.read())
@EtienneR
EtienneR / user.js
Created January 7, 2016 23:39
XMLHttpRequest RESTful (GET, POST, PUT, DELETE)
// Get all users
var url = "http://localhost:8080/api/v1/users";
var xhr = new XMLHttpRequest()
xhr.open('GET', url, true)
xhr.onload = function () {
var users = JSON.parse(xhr.responseText);
if (xhr.readyState == 4 && xhr.status == "200") {
console.table(users);
} else {
console.error(users);
@dseg
dseg / Cargo.toml
Last active July 2, 2016 20:06
nickel Webフレームワークを使ってみる ref: http://qiita.com/dseg/items/66ec3bcecadb0317f85e
[package]
name = "nickel-helloworld-postgres"
version = "0.1.0"
authors = ["johndoe"]
[dependencies]
nickel = "*"
r2d2 = "*"
postgres = "*"
openssl = "*"
@neguse11
neguse11 / notes-unityinjector-and-component.md
Last active October 13, 2022 00:53
UnityInjectorとComponentの動作メモ

UnityInjectorの動作メモ

Unityを分かっていない人(主に筆者)向けのメモです

AddModsSliderへのプルリクエストの検討時にCM3D2-01さんから教わりました。

UnityInjectorの動作のおさらい

  • ReiPatcherでUnityInjector.Patcherを適用すると
@webplumbr
webplumbr / vagrant-getting-started
Last active January 8, 2017 05:10
Getting started with Vagrant
# If you are on a VM (like me), I did the following on Peppermint 5 VM on VirtualBox.
sudo apt-get install vagrant virtualbox
# Make a directory named demo.
mkdir demo
cd demo
# add vagrant virtual box that can be used to initialize VM instances