Skip to content

Instantly share code, notes, and snippets.

View deevroman's full-sized avatar

Roman Deev deevroman

View GitHub Profile
@pnorman
pnorman / 2022Q3CountryTiles.csv
Created November 22, 2022 23:08
2022Q3 OSM usage by country
country osm.org tile requests total requests
DE 2007619478 15493019708
RU 1379970978 16901329649
US 983666291 18346539594
PL 868123678 9942454942
GB 546764609 7317480891
FR 540115081 13940686020
NL 408656025 6593005826
IT 393766036 6885004966
IN 297670395 5293519843
@jtpio
jtpio / README.md
Last active May 17, 2022 15:46
RetroLab 0.3.21 on Binder

RetroLab 0.3.21 on Binder

RetroLab

@usametov
usametov / topics-search.txt
Created February 16, 2021 01:50
how to search github.com for multiple topics
Github.com ui .currently does not natively supoport search for multiple topic tags as of now. However their api allows you to query multiple tags. Below is a simple example to query github.com with ecs and go topic tags.
curl -H "Accept: application/vnd.github.mercy-preview+json" \
https://api.github.com/search/repositories?q=topic:ecs+topic:go
Response from the github can be rather verbose so lets filter only relavant info such repo url and description.
curl -H "Accept: application/vnd.github.mercy-preview+json" \
https://api.github.com/search/repositories\?q\=topic:ecs+topic:go | jq '.items[] | {url:.url, description:.description}'
@az09
az09 / awesome-gis-tg.md
Last active January 30, 2024 08:56
List of good groups and channels from the telegram network on geospatial topics. Mainly in Russian
@arthurattwell
arthurattwell / userChrome.css
Last active July 3, 2023 11:51
Add numbers to Firefox tabs for easier Ctrl+n tab switching
/* userChrome.css can change the Firefox UI.
For details, see https://www.userchrome.org/
Instructions
------------
Save it to your Firefox 'Profile Folder'. To find that folder:
enter about:support in the Firefox address bar and look for it in the list.
Save this file to that folder. Then tell Firefox to load it:
enter about:config in the address bar, and search for userprof
and if that setting exists, set the following value to true:
@shafik
shafik / WhatIsStrictAliasingAndWhyDoWeCare.md
Last active June 9, 2024 01:11
What is Strict Aliasing and Why do we Care?

What is the Strict Aliasing Rule and Why do we care?

(OR Type Punning, Undefined Behavior and Alignment, Oh My!)

What is strict aliasing? First we will describe what is aliasing and then we can learn what being strict about it means.

In C and C++ aliasing has to do with what expression types we are allowed to access stored values through. In both C and C++ the standard specifies which expression types are allowed to alias which types. The compiler and optimizer are allowed to assume we follow the aliasing rules strictly, hence the term strict aliasing rule. If we attempt to access a value using a type not allowed it is classified as undefined behavior(UB). Once we have undefined behavior all bets are off, the results of our program are no longer reliable.

Unfortunately with strict aliasing violations, we will often obtain the results we expect, leaving the possibility the a future version of a compiler with a new optimization will break code we th

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");
@halberom
halberom / 00_play.yml
Created May 17, 2017 09:35
ansible - example of using map + regex_replace to modify all items in a list
---
- hosts: localhost
connection: local
gather_facts: False
vars:
mylist:
- group_1
- group_2
tasks:
@mjn
mjn / avltree.rb
Created May 9, 2012 19:04
Erlang implementation of an AVL tree
-module(avltree).
-export([empty_tree/0, insert/3, lookup/2, write_tree/1]).
lookup(Key, { nil, nil, 0, nil, nil }) ->
not_found;
lookup(Key, { Key, Value, _, _, _ }) ->
{ found, Value };
lookup(Key, { Key1, _, _, Smaller, _ }) when Key < Key1 ->
@Neil-Smithline
Neil-Smithline / idletime.sh
Created March 18, 2012 15:33
Mac OS X Idle Time Shell Script
#!/bin/sh
# Get MacOSX idletime. Shamelessly stolen from http://bit.ly/yVhc5H
/usr/sbin/ioreg -c IOHIDSystem | /usr/bin/awk '/HIDIdleTime/ {print int($NF/1000000000); exit}'