Skip to content

Instantly share code, notes, and snippets.

View 6uclz1's full-sized avatar
🏠
Working from home

ぶち 6uclz1

🏠
Working from home
View GitHub Profile
#!/bin/bash
set -e
CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/tessdata/ "$1" stdout -l eng | xml esc)
hex=$((cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
@yoshikyoto
yoshikyoto / init.el
Last active November 24, 2016 00:51
.emacs with el-get
;; ターミナル以外でEmacsを立ち上げてもpathが通るようにする
(defun set-exec-path-from-shell-PATH ()
"Set up Emacs' `exec-path' and PATH environment variable to match that used by the user's shell.
This is particularly useful under Mac OSX, where GUI apps are not started from a shell."
(interactive)
(let ((path-from-shell (replace-regexp-in-string "[ \t\n]*$" "" (shell-command-to-string "$SHELL --login -i -c 'echo $PATH'"))))
(setenv "PATH" path-from-shell)
(setq exec-path (split-string path-from-shell path-separator))))
(set-exec-path-from-shell-PATH)
@koyopro
koyopro / amazon-calc.js
Last active April 2, 2022 08:23 — forked from polamjag/amazon-calc.js
Amazonで一年間に使った金額と、注文履歴のTSVを出力するブックマークレット【2015年版】
// Amazonの注文履歴をTSV形式で出力するスクリプト
//
// 2015-01-01 時点での DOM 構造に対応, GoogleCrome, Opera でテスト済。
// formatEntry関数を書き換えれば自由な書式で出力できます。
//
// 参考:
// - Amazonの注文履歴をCSV形式にして出力するスクリプト
// https://gist.github.com/arcatdmz/8500521
// - Amazon で使った金額の合計を出す奴 (2014 年バージョン)
// https://gist.github.com/polamjag/866a8af775c44b3c1a6d
@polamjag
polamjag / amazon-calc.js
Last active September 7, 2022 11:23 — forked from arcatdmz/amazon-csv.js
Amazon で使った金額の合計を出す奴 (2014-2016 年バージョン)
// Amazon で使った金額の合計を出す奴
//
// 使い方:
// 1. 全部コピーする (右上の Raw をクリックした先でやるのが楽)
// 2. Amazon の注文履歴ページ ( https://www.amazon.co.jp/gp/css/order-history/ ) を開く
// 3. F12 または 右クリ→要素の検証 とかで出てくる開発者ツールのコンソール (JavaScript REPL) にペースト
// 4. エンターで実行
// (Firefox はなんか allow pasting とタイプしろみたいなことを言われるので従う)
// 5. しばらく待つと alert で合計金額を表示
//
@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active May 24, 2024 03:20
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
@arcatdmz
arcatdmz / amazon-csv.js
Last active January 28, 2024 07:09 — forked from moroya/aitter.js
Amazonの注文履歴をCSV形式にして出力するスクリプト
// Amazonの注文履歴をCSV形式にして出力するスクリプト
//
// 以下のスクリプトを参考に作成されました。
// http://moroya.hatenablog.jp/entry/2013/06/03/225935
//
// 使い方は以下のURLに書いてあります。
// https://junkato.jp/ja/blog/2014/11/13/amazon-payment-history-as-csv/
//
// CSVに成型しているのは14行目から定義されているformatEntryという関数なので、これを書き換えれば自由な書式で出力できます。
(function(){
@tako2
tako2 / theta360.py
Created December 1, 2013 14:13
Controlls RICOH THETA 360 (Python).
#!/usr/bin/env python
# coding: UTF-8
import socket
import struct
DEBUG = True
DEBUG2 = False
PTP_OC_GetDeviceInfo = 0x1001
@pudquick
pudquick / pipista.py
Created November 20, 2012 07:23
pipista - pip module (for installing other modules) for Pythonista
import os, os.path, sys, urllib2, requests
class PyPiError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
def _chunk_report(bytes_so_far, chunk_size, total_size):
if (total_size != None):