Skip to content

Instantly share code, notes, and snippets.

View tlongren's full-sized avatar
🎯
Focusing

Tyler Longren tlongren

🎯
Focusing
View GitHub Profile
@joshenders
joshenders / smokeping.sh
Last active July 26, 2022 18:43
Poor man's smokeping for OS X
#!/bin/bash
# https://gist.github.com/joshenders/52cb78bedaea6787faac
# This script uses the BSD variants of commands and is intended to
# be run on an unmodified installation of OSX.
pmset noidle &
now=$(date +%s)
duration=$((86400*3)) # 3days
@EmranAhmed
EmranAhmed / vps-setup.sh
Last active February 16, 2018 15:55
Simple and Straightforward VPS ( ubuntu and debian ) setup :)
#!/bin/bash
# Upload vps-setup.sh file
# open terminal and change permission like: chmod +x ./vps-setup.sh
# ./vps-setup.sh
# delete this file after setup :)
COLOR_RESET="\033[33;0m"
COLOR_RED="\033[33;31m"
COLOR_GREEN="\033[33;32m"
@duan-li
duan-li / initial_lamp.sh
Last active August 21, 2022 19:07
Ubuntu 14.04 LTS apache php-fpm setup
#!/bin/bash
if [ "$(id -u)" != "0" ]; then
echo "This script must be run as root" 1>&2
exit 1
fi
CURRENT_USER=$(id -u -n)
CURRENT_GROUP=$(id -g -n)
CURRENT_USER_HOME=$(eval echo ~${SUDO_USER})
@tlongren
tlongren / config.json
Created July 20, 2015 01:58
sublime-text-3-user-config
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_extra_bottom": 3,
"caret_extra_top": 3,
"caret_extra_width": 2,
"caret_style": "phase",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
"font_face": "Source Code Pro",
"font_options":
@lorenzocaum
lorenzocaum / new_gist_file.md
Last active July 22, 2019 00:10
An overview of how the sample templates for Event Espresso 4 work together

This is an addendum to the steps for setting up sample templates tutorial for Event Espresso 4:

https://gist.github.com/lorenzocaum/16aac08f099d7c154f04

In this article, we'll go over how different templates work together. Afterwards, you should feel comfortable with locating the template file(s) that you need to edit to make a customization to an events page or venues page in Event Espresso 4.

Sample templates for Event Espresso 4 are available here:

/wp-content/plugins/event-espresso-core-reg/public/Espresso_Arabica_2014

@BurlesonBrad
BurlesonBrad / gist:de5b1ca4644d2b58a10f
Created May 1, 2015 16:08
Full Potential of Schema and WooCommerce
<div itemscope itemtype="http://schema.org/Product">
<span itemprop="name">Kenmore White 17" Microwave</span>
<img src="kenmore-microwave-17in.jpg" alt='Kenmore 17" Microwave' />
<div itemprop="aggregateRating"
itemscope itemtype="http://schema.org/AggregateRating">
Rated <span itemprop="ratingValue">3.5</span>/5
based on <span itemprop="reviewCount">11</span> customer reviews
</div>
<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
<!--price is 1000, a number, with locale-specific thousands separator
@bocharsky-bw
bocharsky-bw / Dockerfile
Last active January 14, 2022 10:25
The full-stack [Ubuntu, Nginx, php-fpm] Docker image example
FROM ubuntu
MAINTAINER Victor Bocharsky <bocharsky.bw@gmail.com>
RUN apt-get update
RUN apt-get install -y nginx php5 php5-fpm php5-intl php5-mysql php5-xdebug
RUN echo "\ndaemon off;" >> /etc/nginx/nginx.conf
RUN sed -i -e "s/;\?daemonize\s*=\s*yes/daemonize = no/g" /etc/php5/fpm/php-fpm.conf
# Nginx config
RUN rm /etc/nginx/sites-enabled/default
@n7studios
n7studios / soliloquy-reload-page-on-navigation-click.php
Created April 20, 2015 14:30
Soliloquy - Reload Page on Navigation Click
<?php
/**
* Plugin Name: Soliloquy - Reload Page on Navigation Click
* Plugin URI: http://soliloquywp.com
* Version: 1.0
* Author: Tim Carr
* Author URI: http://www.n7studios.co.uk
* Description: Reloads the entire Page when the next or previous arrows are clicked, or the pager navigation is used. The correct slide is injected into the URL.
*/
@JulienBlancher
JulienBlancher / filter.d_nginx-auth.conf
Last active March 26, 2024 12:52
Fail2ban Config with Nginx and SSH
#
# Auth filter /etc/fail2ban/filter.d/nginx-auth.conf:
#
# Blocks IPs that makes too much accesses to the server
#
[Definition]
failregex = ^<HOST> -.*"(GET|POST).*HTTP.*"
ignoreregex =
@zmh
zmh / bowery-php-mysql.md
Last active August 29, 2015 14:02
Using Bowery with PHP and MySQL

Using Bowery with PHP and MySQL

Bowery works well with PHP and MySQL, but there are a few steps you have to take before you can get started.

##Short version

  1. Run bowery pull 5397a3faabd3328a13000006 in an empty directory
  2. Run bowery connect and then disconnect with CTRL+C once you see the message "Service php upload complete. Syncing file changes."
  3. Run bowery ssh php, service apache2 restart, and then exit. Disregard any terminal output or warnings that are printed.
  4. Run bowery ssh mysql, mysql --user=root --password=your_password < /application/example.sql, and then exit. Disregard any terminal output or warnings that are printed.
  5. Run bowery connect and then open the last URL that is printed.