Skip to content

Instantly share code, notes, and snippets.

########## Privacy Settings ##########
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 1
#! /bin/sh
# Usage A:
# optimise-images.sh /path/dir
#
# Usage B:
# cd /images/dir
# optimise-images.sh
EXT="jpe?g"
@thinkingcap
thinkingcap / sync_mail.sh
Created February 21, 2017 15:03 — forked from dalethedeveloper/sync_mail.sh
Transferring to/from Gmail accounts to a Google Apps account with imapsync. Also good for GApps to GApps transfers, archives, or migrations.
#/!/bin/bash
# Most of the tweaks here are wrapped up in gmailmig
# https://code.google.com/p/gmailmig/
#
# Props to brave folks who figured this out before me
# http://imapsync.lamiral.info/FAQ
# http://www.thamtech.com/blog/2008/03/29/gmail-to-google-apps-email-migration
# http://seagrief.co.uk/2010/12/moving-to-google-apps-with-imapsync/
# http://blog.mcfang.com/tag/imapsync/
#
@thinkingcap
thinkingcap / upgrade_curl.sh
Created February 6, 2017 23:54
Upgrade curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Dec 23, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.52.1.tar.bz2
tar -xvjf curl-7.52.1.tar.bz2
@thinkingcap
thinkingcap / my.cnf
Created April 29, 2016 13:55 — forked from fevangelou/my.cnf
Optimized MySQL configuration
# Optimized MySQL configuration by Fotis Evangelou - Updated Jan 2016
#
# The settings provided below are a starting point for a 4GB-8GB RAM server with 4 CPU cores.
# If you have less or more resources available you MUST adjust accordingly to save CPU, RAM and disk I/O usage.
# To fine tune these settings for your system, use MySQL DB diagnostics tools like:
# https://launchpad.net/mysql-tuning-primer
# or
# http://blog.mysqltuner.com/download/
# Note that if there is no comment beside a setting, then you don't need to adjust it.
@thinkingcap
thinkingcap / gist:855ebc7618909321a5e7
Created December 28, 2014 06:29
List all NPM global packages
npm ls -gp | awk -F/ '/node_modules/ && !/node_modules.*node_modules/ {print $NF}'
-- Delete all
npm ls -gp | awk -F/ '/node_modules/ && !/node_modules.*node_modules/ {print $NF}' | xargs npm -g rm
-- Alt
npm ls -gp --depth=0 | awk -F/node_modules/ '{print $2}' | grep -vE '^(npm|)$' | xargs npm -g rm
@thinkingcap
thinkingcap / designer.html
Last active August 29, 2015 14:12
designer
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
@thinkingcap
thinkingcap / install nginx
Last active August 29, 2015 14:04
Magento setup tasks
# Install linux update, followed by GCC and Make
sudo yum -y update
sudo yum install -y gcc make
# Install Nginx and PHP-FPM
sudo yum install -y nginx php55-fpm
# Install PHP extensions
sudo yum install php55-fpm php55-mysql php55-common \
php55-mcrypt php55-gd php55-curl php55-json php55-soap