Skip to content

Instantly share code, notes, and snippets.

Abboud digitup

Block or report user

Report or block digitup

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
digitup /
Created Nov 5, 2016 — forked from pwnsdx/
Disable bunch of #$!@ in Sierra
# This is a draft but it works
# FIRST (I don't even know if it works but we'll assume yes)
# sudo launchctl list
# sudo launchctl disable system/netbiosd
# sudo launchctl disable system/parsecd
# sudo launchctl disable system/parentalcontrols.check
# sudo launchctl disable system/airportd

Getting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh

wget -O - | zsh

and then you change your shell to zsh

chsh -s `which zsh`

and then restart

digitup / LoadMultipleScriptsAsync.js
Created Mar 14, 2013
JavaScript - Load multiple 3rd party widgets asyncronously.
View LoadMultipleScriptsAsync.js
var script,
scripts = document.getElementsByTagName('script')[0],
scriptList = {
'plusone' : '//',
'twitter' : '//',
'someother': '//'
for (var id in scriptList) {
script = document.createElement('script');
digitup /
Created Mar 10, 2013
Server - Secure phpMyAdmin
//install phpmyadmin
sudo apt-get install phpmyadmin
//After the installation has completed, add phpmyadmin to the apache configuration.
sudo nano /etc/apache2/apache2.conf
//add phpmyadmin to config file
Include /etc/phpmyadmin/apache.conf
digitup /
Last active Dec 14, 2015
Backup and restore database
rsync /var/lib/mysql -a
//Export Database
mysqldump -uUsername -p Database > db_backup.sql
//Export Multiple databases
mysqldump -uUsername -p --databases db_name1 [db_name2 ...] > db_backup.sql
digitup /
Created Mar 10, 2013
Server - Zip a folder
find /full_path -path '*/.*' -prune -o -type f -print | zip ~/ -@
digitup / GetURLParameters.js
Created Feb 25, 2013
JavaScript - Get URL Parameters
View GetURLParameters.js
function getParameterByName(name)
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regexS = "[\\?&]" + name + "=([^&#]*)";
var regex = new RegExp(regexS);
var results = regex.exec(;
if(results == null)
return "";
return decodeURIComponent(results[1].replace(/\+/g, " "));
digitup / windowWidth.html
Last active Dec 10, 2015
jQuery - windowWidth
View windowWidth.html
$(window).resize(function() {
var windowWidth = $(window).width();
$('.screen-width').text(windowWidth + 'px');
<div id="debug" style="position:fixed;padding:0.3em 0.6em;background:#f1f1f1;font-size:0.6em;bottom:0;left:50%;">
<span class="screen-width">0</span>
digitup / checkURLHash.js
Created Dec 20, 2012
JS - Check URL hash
View checkURLHash.js
function checkHash(backButton) {
if(window.location.hash) {
backButton = true;
} else {
backButton = false;
return backButton;
You can’t perform that action at this time.