Slack Slash Command (application/x-www-form-urlencoded) -> API Gateway -> Lambda (application/json)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function peco-select-git-checkout() { | |
local selected_branch="$(git branch --sort=-committerdate | grep -v '^\*.*' | peco --query "$LBUFFER" | awk -F ' ' '{print $1}')" | |
if [ -n $selected_branch ]; then | |
BUFFER="git checkout $selected_branch" | |
CURSOR=$#BUFFER | |
zle accept-line | |
fi | |
} | |
zle -N peco-select-git-checkout | |
bindkey "^gc" peco-select-git-checkout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Lib | |
( generatePoem | |
) where | |
import Prelude hiding (Word) | |
import Control.Monad (join) | |
import qualified Data.Map as Map | |
import System.Random (randomRIO) | |
import Data.Maybe (isNothing, fromMaybe, fromJust) | |
import Data.List (intercalate) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3 | |
RUN apt-get update && apt-get upgrade -y | |
RUN apt-get install -y libfreetype6-dev libatlas-base-dev liblapack-dev gfortran cron | |
RUN pip install matplotlib | |
RUN pip install pandas | |
RUN pip install bottle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import hashlib | |
import json | |
import os | |
import sqlite3 | |
import time | |
import urllib.request |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import sqlite3 | |
import time | |
from enum import Enum | |
from bottle import request, response, route, run, static_file |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias activate='f=`find . -regex ".*/bin/activate"`; source $f' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] | |
[email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function send_yo() { | |
curl -s -d "api_token=API_TOKEN" -d "username=$1" http://api.justyo.co/yo/ | |
} | |
function yome() { | |
if [ $# -gt 0 ]; then | |
for arg in $@ | |
do | |
send_yo $arg > /dev/null | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from __future__ import print_function | |
import sys | |
def spinner_gen(): | |
while 1: | |
yield '|' | |
yield '/' | |
yield '-' | |
yield '\\' |