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
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
type Fetcher interface { | |
// Fetch returns the body of URL and | |
// a slice of URLs found on that page. |
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
/* | |
* restore-quicksaver-tab-groups.js | |
* Copyright (C) 2017 Teerapap Changwichukarn <[email protected]> | |
* | |
* Distributed under terms of the MIT license. | |
*/ | |
// This script restores tab groups from Firefox session backup. | |
// For my case, OSX, the session backup is at ~/Library/Application\ Support/Firefox/Profiles/{random string}.default/sessionstore-backups/previous.js |
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
/* | |
* restore-quicksaver-tab-groups.js | |
* Copyright (C) 2017 Teerapap Changwichukarn <[email protected]> | |
* | |
* Distributed under terms of the MIT license. | |
*/ | |
// This script restores tab groups from Firefox session backup. | |
// For my case, OSX, the session backup is at ~/Library/Application\ Support/Firefox/Profiles/{random string}.default/sessionstore-backups/previous.js |
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
-(instancetype) initWithFrame:(CGRect)frame { | |
self = [super initWithFrame:frame]; | |
if (self) | |
{ | |
// Initialization code. | |
[self loadFromNib]; | |
} | |
return self; | |
} |
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
#!/bin/sh | |
# --------------------------------------------------------------------------- | |
# git-move-annotated-tag.sh - Move annotated tag without retagging | |
# Author: Teerapap Changwichukarn <[email protected]> | |
# Usage: git-move-annotated-tag.sh -h for more information | |
# | |
# Manual commands: | |
# > git cat-file -p ${tag_name} | sed "1 s/^object .*$/object ${full_target_hash}/g" | git hash-object -w --stdin -t tag |
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
####SSH-agent setting#### | |
AGENT_INFO="$HOME/.ssh/agent.info" | |
function start_agent { | |
echo "Initializing new SSH agent..." | |
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${AGENT_INFO}" | |
chmod 600 "${AGENT_INFO}" | |
. "${AGENT_INFO}" > /dev/null | |
} |
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 bash | |
# | |
# Setting Solarized(Dark) theme for gnome-terminal in GNOME (>=v3.8, using dconf) | |
# | |
# Thanks to | |
# http://unix.stackexchange.com/questions/66579/how-do-i-get-the-solarized-colour-scheme-working-with-gnome-terminal-tmux-and-v | |
# https://github.com/sigurdga/gnome-terminal-colors-solarized | |
# |