Skip to content

Instantly share code, notes, and snippets.

shomah4a / hoge.el
Last active Jul 26, 2021
wsl copy paste from windows clipboard
View hoge.el
;; for wsl
(defun wsl-copy (start end)
(interactive "r")
(shell-command-on-region start end "clip.exe"))
(defun wsl-paste ()
(interactive "*")
(shell-command "powershell.exe -Command 'Get-Clipboard -Format Text' | sed s/\r//g" 1))
(advice-add 'clipboard-kill-ring-save :before #'wsl-copy)
(advice-add 'clipboard-kill-region :before #'wsl-copy)
View hoge.kt
class SomeTest() {
data class Hoge(
val x: Int
class Fuga() {
View fxtest.kt
import arrow.core.Either
import arrow.core.extensions.fx
import arrow.core.flatMap
import java.lang.IllegalStateException
class Hello {
companion object {
fun main(args: Array<String>) {
val count = 100000
import json
import sys
def p(key, indent):
print('%s%s' % (' ' * (indent*2), key))
def print_object(obj, indent=0):
#!/usr/bin/env python3
import argparse
import os
import subprocess
import sys
import boto3
View spam.txt
From: James Porter
My name is James from I am a specialist recruiter for software engineering. I speak Japanese and English and can write a little bit of code. Our goal is to tell you about the newest tech companies in Tokyo.
Global Fintech Company - Fastest Growing Engineering Team in Japan
Global team spread across North America and Asia
Office is located inside of a WeWork office
Very competitive salaries
Startup atmosphere
Modern tech stack
shomah4a /
Last active Feb 23, 2017
import codecs
import csv
import sys
def main():
with'syukujitsu.csv', encoding='sjis') as fp:
reader = csv.reader(fp)
contents = list(reader)[2:-2]
shomah4a /
Last active Feb 7, 2017
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
import json
import operator
import re
import sys
ATTR_REG = re.compile(r'\.([a-zA-Z_][a-zA-Z0-9_]*)')
INDEX_REG = re.compile(r'\[(-?[0-9]+)\]')
#-*- coding:utf-8 -*-
class BlockExit(BaseException):
def __init__(self, block):
self.block = block
class Block(object):
#-*- coding:utf-8 -*-
from __future__ import print_function
import sys
import datetime
def get_format():