Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" version="1.1" width="800" height="600" viewBox="0 0 800 600" id="Layer_1" xml:space="preserve" style=" | |
padding-left: 30px; | |
"><metadata id="metadata93"><rdf:RDF><cc:Work rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/></cc:Work></rdf:RDF></metadata><defs id="defs91"/><line fill="none" stroke="#000000" stroke-miterlimit="10" x1="5.611" y1="506.686" x2="733.46997" y2="506.686" id="line5" style="fill:none;stroke:#000000;stroke-miterlimit:10"/> | |
<line xmlns="http://www.w3.org/2000/svg" fill="none" stroke="#000000" stroke-miterlimit="10" x1="0.6" y1="34.844" x2="5.6" y2="29.844" id="line87" style="fill:none;stroke:#000000;stroke-miterlimit:10"/> | |
<line xmlns="http |
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
mkdir server | |
mount /dev/sda2 server | |
mount /dev/sda1 server/boot | |
mount --bind /proc server/proc | |
mount --bind /sys server/sys | |
mount --bind /dev server/dev | |
mount --bind /lib server/lib/modules |
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/bash | |
dir=/home/Downloads | |
du --max-depth=1 ${dir} -t -1000000 | cut -f 2 | sed -e 's/\(.*\)/"\1"/' | tr '\n' ' ' |
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
<!-- Copied from https://github.com/bperel/geotime-sankey/blob/master/index.html - Only the JS and CSS URLs are absolute--> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<style> | |
@import url(sankey.css); | |
</style> | |
<style> |
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/bash | |
sudo apt-get purge idle idle3 python3 python scratch libreoffice-* wolfram-engine minecraft-pi | |
rm -r ~/python_games | |
rm -rf ~/Documents/BlueJ Projects/ Documents/Greenfoot\ Projects/ Documents/Scratch\ Projects/ |
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
{ | |
"chatTitle": "CHAT external", | |
"chatWelcome": "Hej! Nästa tillgängliga handläggare kommer inom kort svara på ditt ärende.", | |
"defaultUsername": "Användare", | |
"defaultAgentName": "Handläggare", | |
"ownUsername": "Du", | |
"chatEnded": "Chatt sessionen är avslutad", | |
"agentJoined": "Handläggare {name} har anslutit sig till chatt sessionen", | |
"agentLeft": "Handläggare {name} har lämnat sessionen", | |
"agentTyping": "{agentName} skriver...", |
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
-- On DM server | |
create server 'coa_federated' foreign data wrapper 'mysql' options (HOST '127.0.0.1', DATABASE 'coa_federated', USER 'root', PASSWORD 'changeme', PORT 3306, SOCKET '', OWNER 'root'); | |
sudo cp /var/www/inducks/createtables_clean.sql /var/www/inducks/createtables_clean_federated.sql | |
sudo sed -i "s/MyISAM/FEDERATED CONNECTION=\"coa\"/g" /var/www/inducks/createtables_clean_federated.sql | |
-- On coa server | |
CREATE USER federated@'%' IDENTIFIED BY 'changeme'; | |
GRANT ALL ON coa.* TO federated@'%'; | |
FLUSH PRIVILEGES; |
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
// https://gist.github.com/andrei-m/982927#gistcomment-1931258 looks like the fastest Levenshtein implementation | |
const levenshtein = (a, b) => { | |
if (a.length === 0) return b.length | |
if (b.length === 0) return a.length | |
let tmp, i, j, prev, val | |
// swap to save some memory O(min(a,b)) instead of O(a) | |
if (a.length > b.length) { | |
tmp = a | |
a = b | |
b = tmp |