Skip to content

Instantly share code, notes, and snippets.

View ottonet's full-sized avatar

Jean-Paul Otto ottonet

View GitHub Profile
@ottonet
ottonet / makemod
Last active April 12, 2023 14:57
osx compatible magento modman generator
for i in `find . -type f | grep -v \.git | grep -v \.DS_Store | grep -v "^.$" | grep -v "modman" | grep -v "composer.json" | grep -v \.txt | grep -v \.pdf | sed 's/\.\///'`; do echo ${i} ${i}; done > modman
@ottonet
ottonet / lychee
Created July 14, 2015 15:55
lychee nginx config
server {
server_name my.lychee.site;
listen 80;
root /var/www/my.lychee.site/htdocs;
access_log /var/www/my.lychee.site/logs/access.log;
error_log /var/www/my.lychee.site/logs/error.log;
index index.php index.html;
@ottonet
ottonet / composer.json
Created April 13, 2015 17:38
Example Magento 1.x composer.json w/ modman integration
{
"minimum-stability":"dev",
"require": {
"magento/ce": "1.9.1.0",
"aoepeople/composer-installers": "*",
"magento-hackathon/indexer-stats":"*",
"firegento/magesetup":"*",
"firegento/pdf":"*",
@ottonet
ottonet / external.links.js
Last active November 17, 2016 15:10
Automatically add target="_blank" to external links with jQuery
@ottonet
ottonet / Zzzz.xml
Last active September 28, 2016 09:52
Disable Unwanted Magento Core Modules
<?xml version="1.0"?>
<config>
<modules>
<Mage_Downloadable>
<active>false</active>
</Mage_Downloadable>
<Mage_Authorizenet>
<active>false</active>
</Mage_Authorizenet>
<Mage_Usa>
@ottonet
ottonet / syncthing.conf
Created January 14, 2016 15:56 — forked from wethinkagile/syncthing.conf
.config/upstart/syncthing.conf
#
# Upstart Configuration File for Ubuntu 14.10 - to run syncthing
#
# Created 27 Dec 2014 - initial file written based on version from
# Syncthing forums here:
# https://forum.syncthing.net/t/keeping-syncthing-running-ubuntu-upstart/30
#
#
# BEFORE USE: change:
#
@ottonet
ottonet / gist:3335d30ed464bc720c31
Created January 11, 2016 11:08
nginx route to different php processors, you could have some php processing done by v5, some by v7 and even some by hhvm if you'd want that.. .
# Default is to use pool 1
set $custom_php_pool "1";
# If is /admin, we use pool 2
if ($uri ~* "^/index.php/admin/") {
set $custom_php_pool "2";
}
if ($uri ~* "^/qbonline/") {
set $custom_php_pool "2";
}
@ottonet
ottonet / onename
Created January 9, 2016 09:58
Verifying that +ottonet is my blockchain ID. https://onename.com/ottonet
Verifying that +ottonet is my blockchain ID. https://onename.com/ottonet
@ottonet
ottonet / ottonet.zsh-theme
Created January 9, 2016 09:52
My oh-my-zsh theme - just adds username at hostname to the prompt
local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
PROMPT='%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} ${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"
@ottonet
ottonet / README.md
Last active December 22, 2015 14:46 — forked from renchap/README.md
One-line certificate generation/renews with Letsencrypt and nginx

Prerequisites : the letsencrypt CLI tool

This method allows your to generate and renew your Lets Encrypt certificates with 1 command. This is easily automatable to renew each 60 days, as advised.

You need nginx to answer on port 80 on all the domains you want a certificate for and 443 as well if you redirect everything to this port. Then you need to serve the challenge used by letsencrypt on /.well-known/acme-challenge. Then we invoke the letsencrypt command, telling the tool to write the challenge files in the directory we used as a root in the nginx configuration.

I redirect all HTTP requests on HTTPS, so my nginx config looks like :

server {