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
git-create(){ | |
repo_name=$1 | |
dir_name=`basename $(pwd)` | |
if [ "$repo_name" = "" ]; then | |
echo -n "Repo name [$dir_name]?: " | |
read repo_name | |
fi | |
if [ "$repo_name" = "" ]; then |
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
App.directive('uiSrefIf', function($compile) { | |
return { | |
link: function($scope, $element, $attrs) { | |
var uiSrefVal = $attrs.uiSrefVal, | |
uiSrefIf = $attrs.uiSrefIf; | |
$element.removeAttr('ui-sref-if'); | |
$element.removeAttr('ui-sref-val'); | |
$scope.$watch( |
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
<html> | |
<head> | |
<title>ChromeToPocket</title> | |
<script src="import.js"></script> | |
<style> | |
* { | |
margin: 5; | |
padding: 5; | |
} | |
html, body { |
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
var __request_code; | |
var __access_token_string; | |
function process_bookmarks ( bookmarks ) { | |
document.getElementById("progress-icon").innerHTML = "<img height='50px' width='50px' src='spinner-uploading.gif'></img>" | |
document.getElementById("progress-text").innerHTML = "Uploadig bookmarks to Pocket" | |
console.log("Beginning import...") | |
for ( var i =0; i < bookmarks.length; i++ ) { | |
var bookmark = bookmarks[i]; | |
if ( bookmark.url ) { |
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
{ | |
"name": "ChromeToPocket", | |
"short_name": "ChromeToPocket", | |
"description": "Import your chrome bookamrks to Pocket", | |
"version": "0.1", | |
"manifest_version": 2, | |
"browser_action": { | |
"default_icon": "import.png", | |
"default_popup": "popup.html" | |
}, |
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
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.chart div { | |
font: 10px sans-serif; | |
background-color: blue; | |
text-align: right; | |
padding: 3px; | |
margin: 1px; |
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
> tempfile = Tempfile.new(["temp", "text"]) | |
=> #<Tempfile:/tmp/temp20141109-10110-2pjq04text> | |
> tempfile.write("sample tempfile.") | |
=> 16 | |
> tempfile.rewind | |
=> 0 | |
> tempfile.read | |
=> "sample tempfile." | |
> tempfile.close | |
=> nil |
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
> tempfile = Tempfile.new(["temp", "text"]) | |
=> #<Tempfile:/tmp/temp20141109-10110-2pjq04text> | |
> tempfile.write("sample tempfile.") | |
=> 16 | |
> tempfile.rewind | |
=> 0 | |
> tempfile.read | |
=> "sample tempfile." | |
> tempfile.close | |
=> nil |
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 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
record1a, record1b, records1c | |
record2a, record2b, records2c | |
#This is a comment: DO NOT PROCESS | |
record3a, record3b, records3c | |
record4a", record4b, records4c | |
record5a, record5b, records5c |
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
//Simple CSV reader | |
package main | |
import ( | |
"encoding/csv" //Package csv reads and writes comma-separated values (CSV) files. | |
"fmt" //Package fmt implements formatted I/O with functions analogous to C's printf and scanf. | |
"io" //Package io provides basic interfaces to I/O primitives. | |
"os" //Package os provides a platform-independent interface to operating system functionality. | |
) |