Skip to content

Instantly share code, notes, and snippets.

View enricodeleo's full-sized avatar

Enrico Deleo enricodeleo

View GitHub Profile
@ipedrazas
ipedrazas / gist:6d6c31144636d586dcc3
Last active July 10, 2023 16:24
Nginx ssl config

The process starts by creating the CSR and the private key:

openssl req -nodes -newkey rsa:2048 -nodes -keyout dotmarks.net.key -out dotmarks.net.csr -subj "/C=GB/ST=London/L=London/O=dotmarks/OU=IT/CN=dotmarks.net"

Generates

  • dotmarks.net.key
  • dotmarks.net.csr
@dogukancagatay
dogukancagatay / HA Proxy With Docker.md
Last active September 3, 2022 18:22
Basic HAProxy Setup for Multiple Services with Docker

Basic HAProxy Setup for Multiple Services with Docker

  • RabbitMQ
  • Redis
  • Web Server/Ingress
@romannurik
romannurik / inline_worker_with_fallback.html
Created May 24, 2011 19:16
An example of using simple inline Web Workers with a fallback for browsers that can't support this technique.
<!DOCTYPE html>
<html>
<!--
Copyright 2011 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@Partyschaum
Partyschaum / README.md
Last active November 26, 2020 13:15
Install PHP 7.2.0 with latest pthreads extension
$ phpbrew install php-7.2.0 +default -- --with-thread-safety --enable-maintainer-zts --with-tsrm-pthreads --with-openssl=/usr/local/opt/openssl`
$ phpbrew ext install github:krakjoe/pthreads master
@tyleramos
tyleramos / xvfb-run.sh
Created September 18, 2012 18:32
XVFB Run Bash script
#!/bin/sh
# $Id: xvfb-run 2027 2004-11-16 14:54:16Z branden $
# This script starts an instance of Xvfb, the "fake" X server, runs a command
# with that server available, and kills the X server when done. The return
# value of the command becomes the return value of this script, except in cases
# where this script encounters an error.
#
# If anyone is using this to build a Debian package, make sure the package
@ravibhure
ravibhure / gist:7523642
Created November 18, 2013 06:47
HAProxy config for wordpress
# HAProxy config to block /wp-login.php and wp-admin POST method on wordpress webserver
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#log loghost local0 info
maxconn 25000
#debug
#quiet
user prod
group prod
@pinedamg
pinedamg / 1.markdown
Created July 23, 2012 18:10
My Magento Snippets

My Magento Snippets

Checkout virtual - downloadable product

<?php

require_once '../app/Mage.php';
 
Varien_Profiler::enable();
@yusukezzz
yusukezzz / hhvm
Last active January 26, 2017 12:25
hhvm init.d script for centos
#!/bin/bash
#
# /etc/rc.d/init.d/hhvm
#
# Starts the hhvm daemon
#
# chkconfig: 345 26 74
# description: HHVM (aka the HipHop Virtual Machine) is an open-source virtual machine designed for executing programs written in Hack and PHP
# processname: hhvm
@ewiger
ewiger / ConsoleBasedNativeApi.md
Last active August 29, 2015 14:04
Avoiding alerts in cordova with browser as a client
@mlynch
mlynch / service.js
Last active August 29, 2015 14:00
Reusable cordova plugin wrapping service service
angular.module('myApp.services', [])
.factory('Camera', ['$q', function($q) {
return {
getPicture: function() {
var q = $q.defer();
navigator.camera.getPicture(function(imageURI) {
// Do any magic you need