Skip to content

Instantly share code, notes, and snippets.

@nanonanomachine
nanonanomachine / init.vim
Created August 28, 2021 08:00
vim-iced + kaocha test under cursor without vim-iced-kaocha
function! KaochaTestNs() abort
let l:yank = @"
call iced#nrepl#ns#yank_name()
let l:ns = @"
let l:kaocha_run = "(k/run '".l:ns.")"
call iced#repl#execute('eval_code', "(require '[kaocha.repl :as k])", {'ignore_session_validity': v:true})
call iced#repl#execute('eval_code', l:kaocha_run, {'ignore_session_validity': v:true})
let @" = l:yank
endfunction
@nanonanomachine
nanonanomachine / repl.clj
Last active August 7, 2021 02:06
lein repl tips
;; **************
;; Kaocha
;; **************
;; Run kaocha test in Repl
(require '[kaocha.repl :as k])
;; Run whole test
(k/run :unit)
;; Or we can run some namespace
(k/run 'kaocha.random-test)
;; Watch
@nanonanomachine
nanonanomachine / happypath.go
Last active April 25, 2021 09:22
a case for gocui which does not work setCurrentView on key press
// Copyright 2014 The gocui Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package main
import (
"fmt"
"io"
"io/ioutil"
@nanonanomachine
nanonanomachine / main.go
Last active April 25, 2021 06:33
tview initialize setting for white terminal lovers
// https://github.com/rivo/tview/pull/395
package main
import (
"github.com/gdamore/tcell/v2"
"github.com/rivo/tview"
)
func main() {
// Set this so we don't overwrite the default terminal colors
@nanonanomachine
nanonanomachine / autoexec.cfg
Last active October 5, 2019 04:49
CSGO configs
rate "786432"
cl_cmdrate "128" //Max number of command packets sent to server per second
cl_updaterate "128" //Number of packets per second you are requesting from the server
cl_interp_ratio "1" //Sets the interpolation amount (final amount is cl_interp_ratio / cl_updaterate)
cl_interp "0" //Sets the interpolation amount, always set this to 0
cl_lagcompensation "1" //Lag compensation helps by eliminating combat latency from client side view
cl_predict "1" //Skip waiting for server feedback and simulate client side movement in real-time
cl_predictweapons "1" //Skip waiting for server feedback and perform client side prediction of weapon effects
cl_crosshair_drawoutline "0"
@nanonanomachine
nanonanomachine / meishi.json
Created May 2, 2019 10:33
Karabiner Complex Modification Setting which makes Meishi keyboard to operate Spectacle
{
"title": "Meishi",
"rules": [
{
"description": "Meishi as Spectacle operation",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "a",
@nanonanomachine
nanonanomachine / Gemfile
Created November 18, 2018 07:16
Insert profile code
# frozen_string_literal: true
source "https://rubygems.org"
git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
# gem "rails"
gem 'parser'
from urllib import request
import pandas as pd
import MeCab
import mojimoji
import re
df = pd.read_csv('./csv/support-mail/support-mails-from-2016.csv')
# ストップワード
# 日本語

CrossHair

cl_crosshair_drawoutline "1"
cl_crosshair_dynamic_maxdist_splitratio "0.35"
cl_crosshair_dynamic_splitalpha_innermod "1"
cl_crosshair_dynamic_splitalpha_outermod "0.5"
cl_crosshair_dynamic_splitdist "7"
cl_crosshair_outlinethickness "1"
@nanonanomachine
nanonanomachine / cloudvision.rb
Last active April 16, 2016 10:15
Cloud Vision API Test
require 'base64'
require 'json'
require 'net/https'
DIRECTORIES = ['DIR PATH']
API_KEY = 'PASTE YOUR API KEY'
API_URL = "https://vision.googleapis.com/v1/images:annotate?key=#{API_KEY}"
def detect(image_path)