Skip to content

Instantly share code, notes, and snippets.

mactkg mactkg

Block or report user

Report or block mactkg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mactkg
mactkg / install_code_server.sh
Created Nov 24, 2019 — forked from masuidrive/install_code_server.sh
Install code-server on Coder
View install_code_server.sh
#!/bin/bash
VERSION=${VERSION:-2.1692-vsc1.39.2}
WORK_DIR=/home/ubuntu/projects
USER_ID=1000
GROUP_ID=1000
PORT=8888
TARBALL_URL=https://github.com/cdr/code-server/releases/download/$VERSION/code-server$VERSION-linux-x86_64.tar.gz
@mactkg
mactkg / main.js
Last active Jun 20, 2018 — forked from masuidrive/main.js
Google SpreadsheetからBigQueryを呼び出すスクリプト
View main.js
/**
* Google Spreadsheet向けBigQuery取り込みスクリプト
* http://toreta.blog.jp/archives/20649904.html
* License: MIT 2014- Toreta, Inc.
*
* runAllQueries() をトリガーで毎日実行してください
* Queries, Single row queries, Dataの三つのシートを作って下さい
* Queries, Single row queriesのシートには実行するクエリを書きます
* A列にクエリ名、B列にクエリです。
* conuntなどの集約関数で1行しか返らないクエリは「Single row queries」、それ以外は「Queries」に書いて下さい
@mactkg
mactkg / osxSetup.command
Created May 19, 2016 — forked from motoishmz/osxSetup.command
osx setup command. use com.apple.dock.plist
View osxSetup.command
#!/bin/sh
### Desktop & Screen Saver
# Desktopを黒に
echo "Change Desctop Pictures"
osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/Library/Desktop Pictures/Solid Colors/Solid Gray Pro Ultra Dark.png"'
# ScreenSaver Kill
echo "Disable screensaver"
View on-jsx.markdown

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I lead the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can'

@mactkg
mactkg / .vimrc
Last active Aug 29, 2015 — forked from michaelfox/vimrc
Basic / Simple vimrc config file
View .vimrc
set nocompatible
set encoding=utf-8
set hidden
filetype plugin indent on
syntax on
set synmaxcol=2048 " Don't syntax highlight super-long lines (for performance)
set autoindent " automatically indent lines and try to do it intelligently
set smartindent
set backspace=indent,eol,start " backspace behaves 'normally'
View patch.fix.tumblr.getTumblelogs.tbrl.js
// ==Taberareloo==
// {
// "name" : "Fix Tumblr.getTumblelogs 2015.04"
// , "description" : "Fix Tumblr.getTumblelogs 2015.04"
// , "include" : ["background"]
// , "version" : "0.1.2"
// , "downloadURL" : "https://gist.github.com/mactkg/d19a5421c55fa40f5799/raw/ca2da60df200603d322cc7fcafb76eda1febc37f/patch.fix.tumblr.getTumblelogs.tbrl.js"
// }
// ==/Taberareloo==
@mactkg
mactkg / 0_reuse_code.js
Last active Aug 29, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View hatenaCardBgChanger.js
/*
hatenaCardBackgroundChanger
@3846masa
iframeの属性にbackgroundを追加してcss方式で書くとなる(多分)。
*/
window.addEventListener('load',function(){
var list = document.querySelectorAll('iframe[src*="http://hatenablog.com/embed"][background]');
Array.prototype.forEach.call(list, function(node){
View arduino.ino
//===============================
// arduino
//===============================
void setup(){
Serial.begin(9600);
pinMode(13,INPUT);
}
void loop(){
View light.ino
void setup(){
pinMode(2,INPUT);
pinMode(9,OUTPUT);
}
int last_sw;
void loop(){
int sw = digitalRead(2);
int light=0;
You can’t perform that action at this time.