Skip to content

Instantly share code, notes, and snippets.

@azer
azer / Common-Keys-Mac-And-Windows.md
Last active February 10, 2023 14:57
All Command+<letter> combinations in OSX and Windows

Source: ChatGPT. There could be mistakes.

OSX

Key Combination Purpose
Command + A Select all (OSX, Chrome, Firefox, Safari)
Command + B Bold text (OSX, Chrome, Firefox, Safari)
Command + C Copy (OSX, Chrome, Firefox, Safari)
Command + D Dictionary (OSX), Add Bookmark (Chrome, Firefox, Safari)
defmodule HashID do
@coder Hashids.new(
salt: "HmPbtapoe1FGfTFbEEeZcWKuakIQp3L0",
min_en: 6
)
def encode(id, type) do
type =
type
|> to_string
@azer
azer / elixir.md
Last active October 16, 2022 15:16
Notes on Elixir
@azer
azer / gist:38dbf5c259a1fb6aa018b4f8668d04d7
Created August 7, 2019 12:39
Unwatch all repositories of an organization
(function () {
const org = 'ORG'
const nodes = document.querySelectorAll('.Box-row');
const rows = [ ...nodes ];
const orgRows = rows.filter((e) => e.innerText.startsWith(` ${org}/`));
const orgUnsubButtons = orgRows.map(row => row.querySelector('button.select-menu-item[value="included'));
orgUnsubButtons.forEach(button => console.log(button.click()));
@azer
azer / website-topics-nested.json
Last active February 24, 2018 15:03
Wikipedia Website Topics
[
{
"title": "All",
"children": [
{
"title": "3D printing websites"
},
{
"title": "Anatomy websites"
},
We can't make this file beautiful and searchable because it's too large.
1,google.com
2,youtube.com
3,facebook.com
4,baidu.com
5,wikipedia.org
6,yahoo.com
7,google.co.in
8,reddit.com
9,qq.com
10,amazon.com
@azer
azer / gist:5184224
Created March 18, 2013 00:15
Ömer Hayyam Dörtlükleri
Ey özünün sırlarına akıl ermeyen;
Suçumuza, duamıza önem vermeyen;
Günahtan sarhoştum, ama dilekten ayık;
Umudumu rahmetine bağlamışım ben.
Büyükse de isyanım, kötülüklerim,
Yüce Tanrı'dan umut kesmiş değilim;
Bugün sarhoş ve harap ölsem de yarın
Rahmete kavuşur elbet kemiklerim.
var words = "orman roman tilki kilit iri kirli kuzu at rahat karat tarak".replace(/[^\w\s]+/g,'').split(" "),
dict = createDict(words);
console.log( 1, anagrams("tikil") ); // tilki, kilit
console.log( 2, anagrams("atkr") ); // karat, tarak
console.log( 3, anagrams("armon") ); // roman, orman
function createDict(list){
var i = words.length,