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" | |
) | |
// Library | |
context ( | |
logprefix string = "" |
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
hi |
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" | |
"strings" | |
) | |
var ( | |
ws = []float64 { |
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" | |
"strings" | |
) | |
var ( | |
ws = []float64 { |
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 ( | |
"github.com/fogleman/gg" | |
"image" | |
"image/color" | |
"image/draw" | |
"image/gif" | |
"log" | |
"math" |
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 ( | |
"bytes" | |
"io" | |
"log" | |
"net/http" | |
) | |
type LogHandler struct { |
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
You will have to get your cookie string.. The easiest way I have done is simply to use the chrome developer tools networking tab and turn on "preserve data" then copy the whole "cookie" section. | |
Don't forget to set $JOURNAL, $COOKIES | |
for year in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20; do for month in 1 2 3 4 5 6 7 8 9 10 11 12; do echo "Getting $year $month"; curl -X POST 'https://www.livejournal.com/export_do.bml?authas=$JOURNAL' -d 'what=journal' -d "year=20$year" -d "month=$month" -d 'format=xml' -d 'header=Yes' -d 'encid=2' -d 'notranslation=No' -d 'field_itemid=Yes' -d 'field_eventtime=Yes' -d 'field_logtime=Yes' -d 'field_subject=Yes' -d 'field_event=Yes' -d 'field_security=Yes' -d 'field_allowmask=Yes' -d 'field_currents=Yes' --cookie $COOKIES -i > content-$year-$month.xml; done; done |
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 ( | |
"bytes" | |
"encoding/csv" | |
"log" | |
"math/rand" | |
"os" | |
"time" | |
) |
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" | |
"log" | |
"time" | |
) | |
func main() { | |
log.SetFlags(log.Flags()|log.Lshortfile) |
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 createTimesheet(id, date, m, tu, w, th, f, mode) { | |
if (id != "") { | |
return id; | |
} | |
var dateStr = Utilities.formatDate(date, "Australia/Melbourne", "yyyy-MM-dd"); | |
var timesheetTemplateId = <Document ID here>; | |
var prefix = ""; | |
if (mode == "test") { | |
prefix = "Test "; | |
} |
NewerOlder