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
Plugin.create :convert_doseisan_lang do | |
command(:convert_doseisan_lang, | |
name: 'ใฉใใใใ่ชใธๅคๆ', | |
condition: lambda {|opt| true }, | |
visible: true, | |
role: :postbox) do |opt| | |
postbox = Plugin.create(:gtk).widgetof(opt.widget).widget_post.buffer | |
current_text = postbox.text | |
before_dosei_char = ['ใ', 'ใ', 'ใ', 'ใ', 'ใ', 'ใ', 'ใ', 'ใก', 'ใค', 'ใฆ', 'ใฎ', 'ใฒ', 'ใธ', 'ใฟ', 'ใ', 'ใ', 'ใ', 'ใ', 'ใ', 'ใ', 'ใ', 'ใ', 'ใ', 'ใ', 'ใ', 'ใ', 'ใข', 'ใฅ', 'ใง', 'ใฐ', 'ใณ', 'ใน'] |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>ใใใใๅฎถ ๅ้กใจๅฏพ็ญ</title> | |
<meta charset="utf-8"> | |
<style> | |
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); | |
@import url(https://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic); | |
@import url(https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic); |
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
#!/usr/bin/env ruby | |
require 'tmpdir' | |
require 'open-uri' | |
require 'digest' | |
require 'pathname' | |
module HashSum | |
def self.define_component(name) | |
define_method(name) do |file: nil, url: nil, str:nil| |
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 'test/unit' | |
def encode(string, seed, delimiter) | |
string | |
.unpack('U*') | |
.map {|char| | |
char | |
.to_s(seed.length) | |
.tr(seed.length.times.to_a.join, seed) | |
.concat(delimiter) |
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
#!/usr/bin/env ruby | |
# | |
# original: kernel_panic by sasairc | |
# license: WTFPL | |
# | |
class String | |
def mb_center(width, padding=' ') | |
output_width = self.gsub(/\e\[(?:\d{1,3}[;m])*/, '').each_char.map {|c| c.bytesize == 1 ? 1 : 2 }.inject(:+) | |
padding_size = (width - output_width) / 2 |
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
eval( | |
%w( | |
npevmfBOzboqbtvInpevmfTgvodujpoIefgBfodpefxbsht[Itus | |
jo hEBtffeEBefmjnjufsBMBb shtHwb mvftI tusjohHv oqbd | |
lx XV5 X[Hnb q FYdibsYd ibsHup Ttxt f feH tj | |
{f [Husxt ffeH t j{fHuj nftHnbq xc KupTj[ Hkpj | |
oE tffe[Hdpod bu xefmj njufs[P Hkpjo IfoeIe f gBef | |
dp efx bsht[Itu s johEB t ffeEBe fmj njufsBM Bbsh | |
tH wb mvftItusj ohHtqmj u xe fmj nj uf s[HnbqFY dibs |
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
encode = 'ใฑใใใใใซใใฑใใใซใใใใฑใใใซใใฑใใฑใใใซใใซใใฑใใฑใใฑใซใใฑใใฑใใใฑใใใฑใซใใใใใใใซใซใซใใใซใใใซใใใซใใฑใใใซใใใใใใใใใใใใฑใฑใใใใใใใใใใใซใใซใฑใฑใใใใใซใฑใใซใฑใใใฑใใฑใใฑใใใใใใใใฑใซใใใใใใใฑใใใซใซใใใใใใใใซใใใใฑใใฑใฑใใซใใใซใใใใใฑใใใฑใใใฑใซใซใใใซใใใใใใใใใฑใใใใซใใใฑใใใใซใฑใใใใใใใซใใใใใฑใใใใฑใใใซใซใใใซใซใใใใใใใใใใใฑใใ' | |
decode = encode.split('ใ').map {|s| | |
[s.gsub(/ใซ|ใ|ใ|ใฑ|ใ/, | |
'ใซ' => '0', | |
'ใ' => '1', | |
'ใ' => '2', | |
'ใฑ' => '3', | |
'ใ' => '4') | |
.to_i(5) | |
].pack('U') |
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
#!/usr/bin/env ruby | |
require 'json' | |
require 'open-uri' | |
require 'optparse' | |
require 'time' | |
me = File.basename(__FILE__) | |
option = ARGV.getopts('h', 'help') |
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
$ # -a ๅ จใฆใฎใใกใคใซใ่กจ็คบ | |
$ # -I ใชใใทใงใณๅผๆฐใฎใใฟใผใณใซใใใใใชใใใฎใ่กจ็คบ๏ผใใฎๅ ดๅ'.git/'ใ่กจ็คบใใใใใชใ๏ผ | |
$ # --norepor ๆซๅฐพใฎใใกใคใซใใใฃใฌใฏใใชๆฐใ่กจ็คบใใใชใ | |
$ tree -a -I "\.git" -F --noreport ./ | |
./ | |
โโโ renge/ | |
โโโ .gitignore | |
โโโ .travis.yml | |
โโโ Gemfile | |
โโโ Gemfile.lock |