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 | |
while read line | |
do | |
filename=$line | |
# line 1~23 | |
sed -i '1,23d' $filename | |
done < $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
#!/usr/bin/python | |
import sys | |
import os | |
os.system('meld "%s" "%s"' % (sys.argv[2], sys.argv[5])) |
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/python | |
import sys | |
import os | |
os.system('meld "%s" "%s"' % (sys.argv[2], sys.argv[5])) |
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
function ssh () { | |
/usr/bin/ssh -t "$@" "tmux attach || tmux new"; | |
} | |
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
[Desktop Entry] | |
Encoding=UTF-8 | |
Exec=/opt/eclipse-luna/eclipse/eclipse | |
Icon=/opt/eclipse-luna/eclipse/icon.xpm | |
Type=Application | |
Terminal=false | |
Comment=Eclipse Integrated Development Environment | |
Name=Eclipse Luna | |
GenericName=eclipse-4.4 M4 | |
StartupNotify=false |
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
[Unit] | |
Description=Redis Server | |
After=network.target | |
[Service] | |
Type=simple | |
ExecStart=/usr/local/bin/redis-server | |
ExecStop=/usr/bin/kill -15 $MAINPID | |
PIDFile=/var/run/redis_6379.pid | |
Restart=always |
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 | |
# what current session name | |
cur_sess=`gsettings get org.gnome.desktop.session session-name` | |
if [ "$cur_sess" = "'gnome-fallback'" ];then | |
echo "Changing session : 'gnome'" | |
dbus-launch gsettings set org.gnome.desktop.session session-name 'gnome' | |
echo "Changed session : 'gnome'" |
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
#include <stdio.h> | |
#include <inttypes.h> | |
#include <locale.h> | |
int main(void) | |
{ | |
setlocale(LC_NUMERIC, ""); | |
uint32_t i = 5040; | |
printf("%'"PRIu32" the thousands separator\n", i); |
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
#include <stddef.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
int | |
main(void) | |
{ | |
struct s { | |
int i; | |
char c; |