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
| # This code is based on tutorial by slicktechies modified as needed to use oauth token from Twitch. | |
| # You can read more details at: https://www.junian.net/2017/01/how-to-record-twitch-streams.html | |
| # original code is from https://slicktechies.com/how-to-watchrecord-twitch-streams-using-livestreamer/ | |
| import requests | |
| import os | |
| import time | |
| import json | |
| import sys | |
| import subprocess |
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
| require 'time' | |
| name = 'john' | |
| a = <<-SQL | |
| INSERT INTO `users`(name, updated_at) | |
| values( | |
| #{name}, | |
| #{Time.now.iso8601} | |
| ) |
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
| #!/bin/bash | |
| message() { | |
| date -Is | |
| hostname | |
| whoami | |
| who | |
| ip addr | |
| } |
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
| _ |
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
| #!/bin/bash | |
| pb_url='http://ptpb.pw' | |
| echo2() { echo "$@" 1>&2; } | |
| usage() { | |
| name="$(basename "$0")" | |
| echo2 "$name: pastes to or fetches text from '$pb_url'" | |
| echo2 "usage: $name [path]" |
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
| def fancy_show(imgs, *, n_cols=None, fig_dim=None): | |
| if type(imgs) == numpy.ndarray: | |
| imgs = [imgs] | |
| if len(imgs) == 1: | |
| n_rows = 1 | |
| n_cols = 1 | |
| if fig_dim == None: | |
| fig_dim = 10 | |
| figsize = (fig_dim, fig_dim) | |
| else: |
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
| // ==UserScript== | |
| // @name rubylovo | |
| // @namespace rubylovo.rubyroidlabs.com/ | |
| // @description rubylovo bot | |
| // @include http://rubylovo.rubyroidlabs.com/ | |
| // @version 1 | |
| // @grant GM_getValue | |
| // @grant GM_setValue | |
| // ==/UserScript== |
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
| set nocompatible | |
| filetype off | |
| call plug#begin('~/.vim/bundle') | |
| "Plug 'gmarik/Vundle.vim' | |
| "# Plugins | |
| "## Appearance | |
| Plug 'altercation/vim-colors-solarized' |
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
| Numerical Analysis Methods Implementations |
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
| rubocop -V: 0.31.0 (using Parser 2.2.2.2, running on ruby 2.2.1 x86_64-linux) | |
| --------------------------------standalone_class-------------------------------- | |
| # before class C | |
| class C | |
| def foo; end | |
| end # end class C | |
| ----------------------------------associations---------------------------------- | |
| (class | |
| (const nil :C) nil | |
| (def :foo |