Skip to content

Instantly share code, notes, and snippets.

*.pbxproj -crlf -diff -merge
let fs = require('fs');
const readFile = fileInputName => fs.readFileSync(fileInputName).toString();
const safeSplit = str => (
str .
replace(/\\"/g, "__QUOTE__") .
split(/(".*?"|,)/) .
filter(function(piece) { return piece && piece !== ','; }) .
map(function(piece) { return piece.replace(/^"|"$/g, '') }) .
map(function(piece) { return piece.replace(/__QUOTE__/g, "\\\""); })
@soychicka
soychicka / mirror.sh
Created March 3, 2019 06:10 — forked from adliwahid/mirror.sh
httrack for mirroring site on archive.org (waybackmachine)
#this is useful for copying snapshotted sites at archive.org
#copied from http://superuser.com/questions/532036/trouble-using-wget-or-httrack-to-mirror-archived-website
#replace ${wayback_url} with the full URL i.e. http://web.archive.org/web/20020705161639/http://kict.iiu.edu.my/
#replace ${domain_name} with the domain name of the site you'r mirroring without the 'http', so kict.iiu.edu.my
httrack\
${wayback_url}\
'-*'\
'+*/${domain_name}/*'\
-N1005\
--advanced-progressinfo\
@soychicka
soychicka / .block
Last active December 12, 2020 04:09 — forked from MingboPeng/.block
Chord Diagram2
license: gpl-3.0
height: 960
border: no
@soychicka
soychicka / clean-up-arch-linux.md
Last active November 19, 2022 20:06 — forked from rumansaleem/clean-up-arch-linux.md
Instructions to clean up Arch Linux (Manjaro)

Contents

  • Clean pkg cache
  • Remove unused packages (orphans)
  • Clean cache in /home
  • remove old config files
  • Find and Remove
    • duplicates
    • empty files
    • empty directories
  • broken symlinks
We can't make this file beautiful and searchable because it's too large.
"Airport ID","Name","City","Country","IATA","ICAO","Latitude","Longitude","Altitude","Timezone","DST","Tz database time zone","Type","Source"
1,"Goroka Airport","Goroka","Papua New Guinea","GKA","AYGA",-6.081689834590001,145.391998291,5282,10,"U","Pacific/Port_Moresby","airport","OurAirports"
2,"Madang Airport","Madang","Papua New Guinea","MAG","AYMD",-5.20707988739,145.789001465,20,10,"U","Pacific/Port_Moresby","airport","OurAirports"
3,"Mount Hagen Kagamuga Airport","Mount Hagen","Papua New Guinea","HGU","AYMH",-5.826789855957031,144.29600524902344,5388,10,"U","Pacific/Port_Moresby","airport","OurAirports"
4,"Nadzab Airport","Nadzab","Papua New Guinea","LAE","AYNZ",-6.569803,146.725977,239,10,"U","Pacific/Port_Moresby","airport","OurAirports"
5,"Port Moresby Jacksons International Airport","Port Moresby","Papua New Guinea","POM","AYPY",-9.443380355834961,147.22000122070312,146,10,"U","Pacific/Port_Moresby","airport","OurAirports"
6,"Wewak International Airport","Wewak","Papua New Guinea","WWK","AYWK",-3.583
@soychicka
soychicka / duplicate_relationships.adoc
Created April 20, 2023 02:28 — forked from ernestoe/duplicate_relationships.adoc
Finding Duplicate Relationships

Finding Duplicate Relationships

Introduction to Problem

Graph databases and Neo4j particularly, are excellent for a different set of purposes, such as storing, traversing and presenting graphy data (Graphs are Everywhere!), but let’s face it: too much freedom and not enough discipline might bring bad data quality into the formula. A common problem results when creating nodes and properties without indexes or when improperly using MERGE instead of CREATE.