Skip to content

Instantly share code, notes, and snippets.

View peccu's full-sized avatar
🦉
Information is the network

peccu peccu

🦉
Information is the network
View GitHub Profile
@peccu
peccu / README.md
Last active May 28, 2018 08:53
mozilla/send docker-compose.yml
@peccu
peccu / README.md
Created April 17, 2018 02:36
generate password command using sethvargo/go-password

genpass

Install

  • go get github.com/sethvargo/go-password
  • git clone this repo
  • go build path/to/genpass.go
  • move genpass to your PATH
@peccu
peccu / chat.js
Last active September 21, 2017 01:41
send stdin or arguments to slack like chat via webhook
#!/usr/bin/env node
/* references
- [How to get node.js HTTP request promise without a single dependency](https://www.tomas-dvorak.cz/posts/nodejs-request-without-dependencies/)
- [Process | Node.js v8.5.0 Documentation](https://nodejs.org/api/process.html#process_process_stdin)
- stdin
- [HTTP | Node.js v8.5.0 Documentation](https://nodejs.org/docs/latest/api/http.html#http_http_request_options_callback)
- request
- [URL | Node.js v8.5.0 Documentation](https://nodejs.org/docs/latest/api/url.html)
- parse url
#!/bin/sh
#|-*- mode:lisp -*-|#
#| <Put a one-line description here>
exec ros -Q -- $0 "$@"
|#
(progn ;;init forms
(ros:ensure-asdf)
#+quicklisp (ql:quickload '(:clack) :silent t)
)
#!/bin/sh
#|-*- mode:lisp -*-|#
#| <Put a one-line description here>
exec ros -Q -- $0 "$@"
|#
(progn ;;init forms
(ros:ensure-asdf)
#+quicklisp (ql:quickload '(:hunchensocket) :silent t)
)
@peccu
peccu / hubotify.ros
Last active June 6, 2017 03:12 — forked from fukamachi/hubotify.ros
Generate a Hubot script (.js file) from the given Roswell script.
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
|#
#|
Generate a Hubot script (.js file) from the given Roswell script.
Usage:
$ hubotify <roswell script>
@peccu
peccu / git-diff-export
Created June 5, 2017 10:37
git archive only difference files
#!/bin/bash
function usage(){
echo 'usage: git diff-export target1 target2 [output]'
echo
echo 'target1に指定したコミットとtarget2に指定したコミットで差分のあったファイルのみ、'
echo 'target1またはtarget2の新しい方のコミットでのスナップショットを書き出します。'
echo '(差分のなかったファイルや、より新しいコミットで修正されたファイルは書き出されません)'
echo
echo 'outputを指定した場合、outputに書き出します。デフォルトは ../output.zip です。'
exit
;; from Land of Lisp 11.9
;; http://landoflisp.com/robots.lisp
(defun robots ()
;; 盤面を64文字×16行の1024文字で表現している。
;; (65文字目が2行目の1文字目)
;; @を自分として、各キーの方向に進む
;; q w e
;; a @ d
;; z x c
;; tはランダムな場所に飛ぶ
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org
root = true
[*]
# Change these settings to your own preference
indent_style = space
@peccu
peccu / README.org
Last active February 26, 2023 17:46 — forked from codebycliff/ReadingList
AppleScript command for adding entry to safari reading list.

Add to Reading List from Command

Install

Add contents of ReadingList.sh to .bashrc or .zshrc etc.

Usage

atrl URL

Example

atrl http://google.com