Skip to content

Instantly share code, notes, and snippets.

View aanastasiou's full-sized avatar

Athanasios Anastasiou aanastasiou

View GitHub Profile
@killercup
killercup / pandoc.css
Created July 3, 2013 11:31
Add this to your Pandoc HTML documents using `--css pandoc.css` to make them look more awesome. (Tested with Markdown and LaTeX.)
/*
* I add this to html files generated with pandoc.
*/
html {
font-size: 100%;
overflow-y: scroll;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
@tekiegirl
tekiegirl / uniqueId.adoc
Last active March 24, 2021 20:54
Using the graph to control unique id generation.

Using the graph to control unique id generation

Introduction

This gist was prompted by Nigel Small’s tweet of a query to generate a unique id for a node (and is posted here with his agreement). It inspired me to think about how it could be used in a full example, unrestricted by Twitter’s 140 characters. I have also looked at how we could generate different sets of unique ids for different labels.

Auto-incrementing #Neo4j counter MERGE (x:Counter {name:'foo'}) ON CREATE SET x.count = 0 ON MATCH SET x.count = x.count + 1 RETURN x.count

— Nigel Small (@technige) December 16, 2013
@shalaby
shalaby / importCSV.sql
Last active March 30, 2022 10:59
Import csv to mariadb
mysql -uroot -p --local-infile
LOAD DATA LOCAL INFILE "file.csv"
INTO TABLE db.table
FIELDS TERMINATED BY ','
ENCLOSED BY '\"'
LINES TERMINATED BY '\n'
@ikegami-yukino
ikegami-yukino / kleinberg.py
Created March 10, 2015 04:48
Burst detection by kleinberg's algorithm
from collections import namedtuple
import np
class Bursts:
def __init__(level, start, end):
self.level = level
self.start = start
self.end = end
@r00tdaemon
r00tdaemon / Install PyQt5 on Ubuntu with python3 .md
Last active May 4, 2024 04:08
Install PyQt5 on Ubuntu with python3. Steps to set up PyQt5 (ubuntu). With python code generation

Installation

pip3 install --user pyqt5  
sudo apt-get install python3-pyqt5  
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools

Configuring to run from terminal

@ctralie
ctralie / Airplane.txt
Created September 1, 2018 13:38
CurvatureScaleSpace
64 235 65 234 66 234 67 234 68 233 69 233 70 233 71 232 72 232 73 232 74 232 75 232 76 231 77 231 78 231 79 231 80 231 81 230 82 230 83 230 84 230 85 230 86 230 87 230 88 230 89 230 90 230 91 229 92 229 93 229 94 229 95 229 96 229 97 229 98 229 99 229 100 229 101 228 102 227 101 226 100 226 99 226 99 225 99 224 100 224 101 224 101 225 102 226 103 226 104 226 105 227 106 227 107 227 108 226 109 226 110 226 111 226 112 226 113 225 114 225 115 225 116 225 117 225 118 224 119 224 120 224 121 224 122 224 123 224 124 223 125 223 126 223 127 222 128 222 129 222 130 222 131 222 132 222 133 221 134 221 135 221 136 221 137 221 138 221 139 221 140 221 141 221 142 221 143 221 144 221 145 221 146 221 147 221 148 221 149 221 150 221 151 221 152 221 153 221 154 221 155 221 156 221 157 221 158 221 159 221 160 221 161 221 162 221 163 221 164 221 165 221 166 221 167 221 168 221 169 221 170 221 171 221 172 221 173 221 174 221 175 221 176 221 177 221 178 221 179 221 180 221 181 221 182 221 183 221 184 221 185 221 186 221 187 221
@isomorphisms
isomorphisms / gist:3114ab86960656a729a6b4653001aae2
Created November 27, 2019 06:08
how to pull from docker hub using podman/buildah
On void linux.
Under `/etc/containers/` there is a file called `registries.conf`. It is complemented by `man 5 containers-registries.conf`.
Change (for me lines 11-12) which say
[registries.search]
registries = []