Skip to content

Instantly share code, notes, and snippets.

@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