Skip to content

Instantly share code, notes, and snippets.

View efenacigiray's full-sized avatar

Efe Naci Giray efenacigiray

  • DeliveryHero
  • Berlin
View GitHub Profile
{
".123" : "application/vnd.lotus-1-2-3",
".3dml" : "text/vnd.in3d.3dml",
".3g2" : "video/3gpp2",
".3gp" : "video/3gpp",
".a" : "application/octet-stream",
".aab" : "application/x-authorware-bin",
".aac" : "audio/x-aac",
".aam" : "application/x-authorware-map",
".aas" : "application/x-authorware-seg",
@leonjza
leonjza / cache.py
Last active February 22, 2023 03:14
Simple SQLite Cache
#!/usr/bin/python
import os
import errno
import sqlite3
import sys
from time import time
from cPickle import loads, dumps
import logging
@rodrigoborgesdeoliveira
rodrigoborgesdeoliveira / ActiveYouTubeURLFormats.txt
Last active July 4, 2024 18:53 — forked from ScottCooper92/gist:ea11b690ba4b1278e049
Example of the YouTube videos URL formats
http://www.youtube.com/watch?v=-wtIMTCHWuI
http://youtube.com/watch?v=-wtIMTCHWuI
http://m.youtube.com/watch?v=-wtIMTCHWuI
https://www.youtube.com/watch?v=lalOy8Mbfdc
https://youtube.com/watch?v=lalOy8Mbfdc
https://m.youtube.com/watch?v=lalOy8Mbfdc
http://www.youtube.com/watch?v=yZv2daTWRZU&feature=em-uploademail
http://youtube.com/watch?v=yZv2daTWRZU&feature=em-uploademail
http://m.youtube.com/watch?v=yZv2daTWRZU&feature=em-uploademail
@abdullahpazarbasi
abdullahpazarbasi / turkish_phone_number_regex_test.php
Last active January 11, 2023 15:21
Türkiye Telefon Numarası Regular Expression (Regex) Pattern PCRE
<?php
$sPattern = '/^(?:(?:\+90|0090|0)[ ]?)?(?:(?<ac>21[26]|22[2468]|23[26]|24[268]|25[268]|26[246]|27[246]|28[2468]|31[28]|32[2468]|33[28]|34[2468]|35[2468]|36[2468]|37[02468]|38[02468]|392|41[246]|42[2468]|43[2468]|44[26]|45[2468]|46[246]47[2468]|48[2468]|50[1567]|51[02]|52[27]|5[34]\d|55[1234569]|56[124]|59[246]|800|811|822|850|8[89]8|900)|\((?P<ac>\g<ac>)\))[ -]*(?<sn1>\d{3})[ -]*(?<sn2>\d{2})[ -]*(?<sn3>\d{2})$/J';
//
//$sSubject = '5554443322';
$sSubject = '(555)-444-33-22';
//
$aMatches = [];
if (preg_match($sPattern, $sSubject, $aMatches)) {
echo '(' . $aMatches['ac'] . ') ' . $aMatches['sn1'] . ' ' . $aMatches['sn2'] . ' ' . $aMatches['sn3']; // (555) 444 33 22
}
@robhrt7
robhrt7 / MySQL_5-7_macOS.md
Last active February 28, 2024 03:48 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
@kgriffs
kgriffs / falcon-3.0-roadmap.md
Last active May 10, 2021 22:23
Falcon 3.0 Roadmap

Falcon 3.0 Roadmap

3.0.0a1

  • Review/Merge the ASGI implementation - PR #1573
  • Review/Merge native form parsing (WSGI only) - PR #1549
  • Fix doc formatting issue (see also comment on PR #1566)
  • Get tests to pass on Windows
  • Add windows gate to Travis CI
@joshzcold
joshzcold / generate.js
Created May 25, 2021 17:23
Javascript generate random appealing colors
/*
* Generate appealing random colors using HSV
* https://martin.ankerl.com/2009/12/09/how-to-create-random-colors-programmatically/
*/
// needed to keep colors random from each other
const golden_ratio_conjugate = 0.618033988749895
// using hsb create perdictable rgb values
function hsv_to_rgb(h, s, v){
h_i = parseInt(h*6)
let f = h*6 - h_i