This file contains 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
none |
This file contains 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
package main | |
import ( | |
"fmt" | |
"sort" | |
) | |
func mode(arr []int) int { | |
sort.Ints(arr) | |
var mode_count, mode_value, current_count, current_value int |
This file contains 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
package main | |
import ( | |
"fmt" | |
"strconv" | |
"bufio" | |
"io" | |
"os" | |
"testing" | |
) |
This file contains 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
irregular_verb = { | |
# AAA | |
'bet': 'bet', | |
'broadcast': 'broadcast', | |
'burst': 'burst', | |
'cast': 'cast', | |
'cost': 'cost', | |
'cut': 'cut', | |
'hit': 'hit', | |
'hurt': 'hurt', |
This file contains 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
$ cat /sys/devices/platform/sony-laptop/thermal_profiles | |
balanced silent performance | |
$ echo silent | sudo tee /sys/devices/platform/sony-laptop/thermal_control |
This file contains 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
sudo xrandr --newmode "2560x1440_30.00" 227.75 2560 2720 2992 3424 1440 1443 1448 1480 -hsync +vsync | |
sudo xrandr --addmode HDMI1 "2560x1440_30.00" |
This file contains 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
#!/bin/sh | |
if [ 2 -ne $# ]; then | |
echo "引数にデータベース名 実行するSQL文を与えてください" 1>&2 | |
exit 1 | |
fi | |
sqlite3 $1<<EOF | |
.separator , | |
$2 | |
.exit |
This file contains 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 python | |
# -*- coding: utf-8 -*- | |
from optparse import OptionParser | |
import pynotify | |
def notify(app_name, title, message): | |
icon = 'dialog-information' | |
if app_name is None: | |
app_name = 'app_name' | |
if title is None: |
This file contains 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 python | |
# -*- coding: utf-8 -*- | |
import popen2 | |
import re | |
def extractBothModifiedFileName(): | |
r, w, e = popen2.popen3('git status') | |
for line in r: | |
if not line.find('both modified:') is -1: | |
yield re.split('[\t ]*', line.strip())[-1] |
This file contains 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
gbmec() { | |
git status | awk '/both modified:/{print $4}' | xargs emacsclient | |
} |
OlderNewer