Skip to content

Instantly share code, notes, and snippets.

View nyanshell's full-sized avatar
🐈

Gestalt LUR nyanshell

🐈
View GitHub Profile
@nyanshell
nyanshell / .emacs
Created March 16, 2023 10:17
emacs rime config
(use-package rime
:custom
(rime-librime-root "/home/flandre/.emacs.d/librime/build")
;; (rime-librime-root (expand-file-name "librime/build" user-emacs-directory))
(default-input-method "rime")
:bind
(:map rime-mode-map
("C-`" . 'rime-send-keybinding)))
;; :config
;; (define-key rime-active-mode-map (kbd "C-2") 'rime-s2t)
@nyanshell
nyanshell / keepalive.py
Last active July 6, 2022 04:58
twitter-ak-keepalive
import os
from requests_oauthlib import OAuth1Session
API_KEY = os.getenv('API_KEY')
API_SECRET = os.getenv('API_SECRET')
def keep_alive():
oauth = OAuth1Session(client_key, client_secret=client_secret)
user_info = oauth.get('https://api.twitter.com/1.1/users/show.json', params={'screen_name': 'twitter'})
#!/bin/bash
# location: /usr/local/share/login_notify.sh
# /etc/pam.d/sshd
# add optional pam_exec.so /usr/local/share/login_notify.sh
function post_to_slack () {
# format message as a code block ```${msg}```
SLACK_MESSAGE="\`\`\`$1\`\`\`"
new ssh-login channel
https://hooks.slack.com/services/<channel-url>

Keybase proof

I hereby claim:

  • I am nyanshell on github.
  • I am geshtalt (https://keybase.io/geshtalt) on keybase.
  • I have a public key whose fingerprint is 1D8E 5678 D278 DC60 2401 0E05 8197 1AC8 6B2A A7A1

To claim this, I am signing this object:

@nyanshell
nyanshell / README.md
Last active June 8, 2019 08:10
gpu_tf_bench

environment

NVIDIA

i7-6700k
ASUS GTX 1080 8G
CUDA 9 CUDNN 7
python 3.6.6
tensorflow 1.12.0
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "test" do |config|
config.vm.hostname = "test"
config.vm.box = "bento/ubuntu-16.04"
config.vm.network "private_network", type: "dhcp"
config.vm.provider "virtualbox" do |vb|
@nyanshell
nyanshell / README.md
Created April 27, 2016 17:07
dnn practice
@nyanshell
nyanshell / .vimrc
Created August 7, 2015 03:48
vim config
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" " alternatively, pass a path where Vundle should install plugins
" "call vundle#begin('~/some/path/here')
"
" " let Vundle manage Vundle, required
@nyanshell
nyanshell / .bumpversion.cfg
Created November 19, 2014 02:22
.bumpversion.cfg
[bumpversion]
files = setup.py corpus/__init__.py
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(?P<release>.*)
serialize =
{major}.{minor}.{patch}{release}
{major}.{minor}.{patch}
commit = True
tag = True
current_version = 0.3.1a
@nyanshell
nyanshell / mandelbrot.py
Last active August 29, 2015 14:08
A bokeh image embedding sample.
from __future__ import division
import numpy as np
from bokeh.plotting import *
from bokeh.resources import CDN
from bokeh.embed import components
from bottle import run, template, route, jinja2_view