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
use std::cell::RefCell; | |
use std::rc::Rc; | |
type Link<T> = Rc<RefCell<Node<T>>>; | |
pub struct Node<T: Copy> { | |
value: T, | |
next: Option<Link<T>>, | |
} |
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
WITH RECURSIVE fib (m, n) AS ( | |
SELECT 1, 1 | |
UNION ALL | |
SELECT n, m + n FROM fib | |
) | |
SELECT m FROM fib | |
LIMIT 10 | |
; | |
m | |
---- |
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
$ 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
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
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
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
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
#!/bin/bash | |
cd ~ | |
echo "apt-getを使用するためにパスワードを入力" | |
sudo apt-get update | |
sudo apt-get install -y zsh | |
echo "シェルをzshに変更するためにパスワードを入力" | |
chsh -s /bin/zsh | |
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/bash | |
# sudo dd if=~/Downloads/2013-09-25-wheezy-raspbian.img of=/dev/sdb | |
# sudo raspi-config | |
echo -n "What's this ip address?: " | |
read IP_ADDRESS | |
sudo apt-get update | |
sudo apt-get install -y libsqlite3-dev libssl-dev python-pip emacs | |
sudo pip install virtualenv virtualenvwrapper |
NewerOlder