Skip to content

Instantly share code, notes, and snippets.

View Omranic's full-sized avatar

Abdelrahman Omran Omranic

View GitHub Profile
@Omranic
Omranic / command.sh
Created October 2, 2015 19:03 — forked from sponomarev/command.sh
Remove iTerm2 icon from Dock
# remove
/usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist
# restore
/usr/libexec/PlistBuddy -c 'Delete :LSUIElement' /Applications/iTerm.app/Contents/Info.plist
@Omranic
Omranic / slugify.js
Last active February 26, 2019 13:07 — forked from demoive/slugify.js
/**
* Converts a string to a "URL-safe" slug.
* Allows for some customization with two optional parameters:
*
* @param {string} Delimiter used. If not specified, defaults to a dash "-"
* @param {array} Adds to the list of non-alphanumeric characters which
* will be converted to the delimiter. The default list includes:
* ['–', '—', '―', '~', '\\', '/', '|', '+', '\'', '‘', '’', ' ']
*/
if (!String.prototype.slugify) {

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@Omranic
Omranic / gist:3728428
Created September 15, 2012 15:15
Extract all PHP packages, delete compressed files, do something manual, re-compress again
for %%X in ("D:\binary\php\*.tar.gz") do "C:\Program Files\7-Zip\7z.exe" x "%%X" -o"D:\binary\php\"
for %%X in ("D:\binary\php\*.tar") do "C:\Program Files\7-Zip\7z.exe" x "%%X" -o"D:\binary\php\"
del "D:\binary\php\*.tar.gz","D:\binary\php\*.tar"
REM # for /d %%X in ("D:\binary\php\*") do "c:\Program Files\7-Zip\7z.exe" a -ttar "%%X.tar" "%%X\"
REM # for %%X in ("D:\binary\php\*.tar") do "c:\Program Files\7-Zip\7z.exe" a -tgzip "%%X.gz" "%%X"
@Omranic
Omranic / vivvo3-vb3-db-migrate.php
Created April 3, 2012 18:27
Simple old code for migrating Vivvo3 to vB3 DB - Run inside vB3
<?php
// ###################### Start Importing Vivvo User #######################
if ($_REQUEST['do'] == 'vivvousers')
{
if (empty($vbulletin->GPC['perpage']))
{
$vbulletin->GPC['perpage'] = 1000;
}
echo '<p>Importing Vivvo Users</p>';