Skip to content

Instantly share code, notes, and snippets.

View entr's full-sized avatar

Zlatko Zlatev entr

  • Yotpo SMSBump
  • Burgas, Bulgaria
View GitHub Profile
@komuw
komuw / install NVM and nodeJS.yml
Created November 20, 2014 17:40
Ansible task to install nvm and nodeJS
#first seen here: http://www.snip2code.com/Snippet/63701/Ansible-task-to-install-nvm-and-node
# Here is how to install nvm and node in an Ansible task.
# I tried a bunch of different things, and as usual it's simple, but you have to get it right.
# The important part is that you have to shell with /bin/bash -c and source nvm.sh
---
- name: Install nvm
shell: >
curl https://raw.githubusercontent.com/creationix/nvm/v0.7.0/install.sh | sh
creates=/home/{{ ansible_user_id }}/.nvm/nvm.sh
@markjaquith
markjaquith / nginx.conf
Last active December 25, 2022 15:55
My WordPress Nginx setup
upstream phpfpm {
server unix:/var/run/php5-fpm.sock;
}
upstream hhvm {
server unix:/var/run/hhvm/hhvm.sock;
}
# SSL
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
<?php
/**
* Plugin Name: Multisite Network Upgrade WP-CLI Command
* Plugin URI: https://gist.github.com/westonruter/beb6120e61e9691e88ac
* Author: Weston Ruter, Mo Jangda
* Description: From command line run <code>wp multisite-network-upgrade</code>. Script converted into WP-CLI command from Mo's <a href="https://gist.github.com/mjangda/986838">CLI script</a>.
* License: GPL2
*/
if ( ! defined( 'WP_CLI' ) || ! WP_CLI ) {
#!/bin/bash
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Mathias Leppich <mleppich@muhqu.de>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@sandcastle
sandcastle / iptables.sh
Last active April 30, 2018 12:55
Default firewall configuration using iptables for a fresh Ubuntu 14.04 server.
#!/bin/sh -x
# ==================================
# iptables default configuration script
#
# - this locks down our servers port access
# ==================================
# install fail2ban
sudo apt-get update
@YesThatAllen
YesThatAllen / rake.rb
Last active December 15, 2020 13:14
Rake tasks in Discourse as of April 13, 2017
# /var/discourse# ./launcher enter app
# RAILS_ENV=production bundle exec rake -T
rake about # List versions of all Rails frameworks and the environment
rake add_topic_to_quotes # Add the topic to quotes
rake admin:create # Creates a forum administrator
rake admin:invite[email] # invite an admin to this discourse instance
rake api_key:get # generate api key if missing, return existing if already there
rake assets:clean[keep] # Remove old compiled assets
rake assets:clobber # Remove compiled assets
@magnetikonline
magnetikonline / README.md
Last active June 6, 2024 06:16
Setting Nginx FastCGI response buffer sizes.
# Install ttfautohint on Ubuntu 12.04 LTS
# @author: Jean Lescure
# 2014/04/23
# Clone ttfautohint git repo to 'tmp' dir and cd into resulting repo folder
cd /tmp
git clone git://repo.or.cz/ttfautohint.git
cd ttfautohint
# Handle bootstrap's dependency: automake
# install latest node
sudo add-apt-repository --yes ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install --yes nodejs
# install java
sudo apt-get -y install openjdk-7-jdk
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
export PATH=${PATH}:${JAVA_HOME}/bin
@kepstin
kepstin / 90-thinkpad-touchpad.conf
Last active December 31, 2015 21:58
Touchpad configuration for Thinkpad T440p (and probably other thinkpads in the same series)
# Drop this file into /etc/X11/xorg.conf.d
# This configures the middle and right-click areas at the *top* of the touchpad
# only. The main and bottom areas are left-click.
# The key setting is that AreaTopEdge is set to prevent you from moving the
# mouse cursor by accident while clicking the trackpoint buttons.
# Inspired by http://who-t.blogspot.ca/2013/12/lenovo-t440-touchpad-button.html
Section "InputClass"