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
| import UIKit | |
| import PlaygroundSupport | |
| let scrollView = UIScrollView(frame: CGRect(x: 0, y: 0, width: 100, height: 100)) | |
| scrollView.backgroundColor = .red | |
| let stackView = UIStackView(frame: CGRect(x: 0, y: 0, width: 1000, height: 100)) | |
| stackView.backgroundColor = .gray | |
| stackView.axis = .horizontal | |
| stackView.spacing = 10 |
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 |

