h - Move left
j - Move down
k - Move up
l - Move right
$ - Move to end of line
0 - Move to beginning of line (including whitespace)
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
| HP provides a downloadable "driver" for Linux for the HP 107w printer but there are NO reasonable install instructions provided, and following the "obvious" install process did not get the printer working. | |
| The closest I found to HP install instuctions once I knew more is https://support.hp.com/in-en/document/c05588857 | |
| Since I found this annoying and wasted more time on getting this printer working under Linux, I'm sharing a summary of what did work (on Debian 10). | |
| 1. Download the driver file from https://support.hp.com/us-en/drivers/selfservice/hp-laser-100-printer-series/24494339/model/24494342 from under the "Basic Drivers" menu for when the OS is set to Linux. | |
| The current version now is: "HP Laser 100 and HP Color Laser 150 Printer series Print Driver V1.00.39:00.12 5.9 MB Mar 20, 2019" |
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
| root@vmi465483:~# cat /etc/nginx/sites-enabled/dspace.conf | |
| server { | |
| server_name repositorio.unijuanpablo.edu.pe; | |
| root /var/www/html/; | |
| client_max_body_size 2000m; | |
| location / { | |
| return 301 http://repositorio.unijuanpablo.edu.pe/xmlui/; | |
| } |
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
| # From https://sigterm.sh/2010/07/09/generating-a-dependency-graph-for-a-postgresql-database/ | |
| # Converted to Python3 | |
| # Add config fort dbport | |
| # Increase PNG Size | |
| # pylinting | |
| from optparse import OptionParser, OptionGroup | |
| import sys | |
| import psycopg2 |
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
| object ParallelProcessing { | |
| val queries: List[(String, String)] = List( | |
| ("SELECT * FROM ABC", "output1"), | |
| ("SELECT * FROM XYZ", "output2") | |
| ) | |
| // Just use parallel collection instead of futures, that's it | |
| queries.par foreach { | |
| case (query, path) => |
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
| from SPARQLWrapper import SPARQLWrapper, POST, BASIC, DIGEST, TURTLE, N3, XML, RDFXML | |
| from rdflib import Graph | |
| sparql = SPARQLWrapper("http://localhost:7200/repositories/myrepo") | |
| sparql.setHTTPAuth(BASIC) | |
| sparql.setCredentials("admin", "admin") | |
| sparql.setMethod(POST) | |
| sparql.setQuery(""" | |
| construct {?s ?p ?o} | |
| where { |
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
| SELECT * FROM sys_rdf_schema; | |
| ld_dir('/data', '*.ttl', 'http://www.example.com/genealogy.owl#'); | |
| delete from DB.DBA.load_list where ll_file='/data//einstein.ttl'; | |
| SPARQL SELECT (COUNT(DISTINCT ?x) AS ?count) WHERE { ?x ?y ?z }; | |
| sparql clear graph <http://www.example.com/genealogy.owl#>; | |
| sparql load <https://github.com/blokhin/genealogical-trees/raw/master/data/header.ttl> into <http://www.example.com/genealogy.owl#>; | |
| rdfs_rule_set('fhkb', 'http://www.example.com/genealogy.owl#'); | |
| SPARQL SELECT ?g count(*) as ?count WHERE { GRAPH ?g {?s ?p ?o } } GROUP BY ?g ORDER BY DESC 2; |
Lsyncd is a tool used to keep a source directory in sync with other local or remote directories. It is a solution suited keeping directories in sync by batch processing changes over to the synced directories.
So the generic use case is to keep a source directory in sync with one or more local and remote directories.
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
| function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s } | |
| function rtrim(s) { sub(/[ \t\r\n]+$/, "", s); return s } | |
| function trim(s) { return rtrim(ltrim(s)); } | |
| BEGIN { | |
| # whatever | |
| } | |
| { | |
| # whatever | |
| } | |
| END { |