Skip to content

Instantly share code, notes, and snippets.

View zoghal's full-sized avatar
🏠
Working from home

Saleh Souzanchi zoghal

🏠
Working from home
View GitHub Profile
@LettError
LettError / copyCurrentGitVersionToPrevLayer.py
Last active July 4, 2019 08:25
RoboFont: copy glif from git repo to layer in current glyph.
"""
Assuming you have
a UFO open in RoboFont
a current glyph selected
and furthermore that
this glyph is part of a git repository
and that you have done some work on it
and would like to compare the current state in robofont
@fevangelou
fevangelou / my.cnf
Last active April 26, 2024 09:12
Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers)
# === Optimized my.cnf configuration for MySQL/MariaDB (on Ubuntu, CentOS, Almalinux etc. servers) ===
#
# by Fotis Evangelou, developer of Engintron (engintron.com)
#
# ~ Updated December 2021 ~
#
#
# The settings provided below are a starting point for a 8-16 GB RAM server with 4-8 CPU cores.
# If you have different resources available you should adjust accordingly to save CPU, RAM & disk I/O usage.
#
@Noitidart
Noitidart / _ff-addon-createResourceURI.js
Created July 12, 2015 10:30
_ff-addon-createResourceURI - Createa resource:// URI on the fly.
let res = Services.io.getProtocolHandler("resource").QueryInterface(Ci.nsIResProtocolHandler);
res.setSubstitution("rawr", Services.io.newURI('http://www.bing.com/',null,null));
// now try navigating to resource://rawr it will load bing
@hallaji
hallaji / README.markdown
Last active August 9, 2017 02:49
Iranian National Identifier Validator

Iranian National Identifier Validator

A validator for Iranian (Persian) national identifier or social number

Languages

c#, java, javascript, php

Types

parameter: string (It doesn't support arabic or persian numbers)
return: boolean

from selenium import webdriver
from PIL import Image
import datetime
filename = "miri_regev_"+datetime.datetime.now().strftime("%Y.%m.%d.%H:%M:%S")+".png"
fox = webdriver.Firefox()
fox.get('https://www.facebook.com/miri.regev.il')
fox.save_screenshot(filename) # saves screenshot of entire page
fox.quit()
@256cats
256cats / composer.json
Last active February 21, 2024 00:58
Web scraping ReactPHP Curl Proxies, curl multi example, scraping news ycombinator, explanation here: http://256cats.com/fast-scraping-with-reactphp-curl-proxies/
{
"require": {
"khr/react-curl": "~2.0",
"sunra/php-simple-html-dom-parser": "~1.5"
}
}
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
<?php
namespace App\Controller;
use App\Controller\AppController;
/**
* Bookmarks Controller
*
* @property App\Model\Table\BookmarksTable $Bookmarks
*/
#!/bin/bash
#
# Nginx build script - jacob@ycnrg.org
#
# Updates code from git/hg repos (or clones if it doesn't exist) for both
# nginx and extra modules, then fires off make
#
# Revision: 3
#
PREFIX="/usr"
@zoghal
zoghal / nginx-update
Last active August 29, 2015 14:17 — forked from MikeWilkie/nginx-update
cd ~/git/nginx
rm -rf nginx-1*
rm -rf openssl-1*
wget https://www.openssl.org/source/openssl-1.0.1k.tar.gz
wget http://nginx.org/download/nginx-1.7.10.tar.gz
tar xzvf openssl* && rm -rf openssl-1.0.1k.tar.gz
tar -xzvf nginx-1*.tar.gz
rm -rf nginx-1*.tar.gz
cd echo-nginx-module && git pull && cd ../
cd headers-more-nginx-module && git pull && cd ../