Skip to content

Instantly share code, notes, and snippets.

@code100
code100 / 00.imgproxy_vs_alternatives.md
Created June 9, 2021 03:02 — forked from DarthSim/00.imgproxy_vs_alternatives.md
imgproxy vs alternatives benchmark

imgproxy vs alternatives benchmark

Setup

  • c5.xlarge AWS instance: 4 CPUs, 8 GB RAM
  • Ubuntu 18.04
  • Go 1.12
  • Python 2.7
  • Vips 8.7.4
@code100
code100 / git-deployment.md
Created July 15, 2020 22:12 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@code100
code100 / post-receive
Created July 13, 2020 19:03 — forked from lemiorhan/post-receive
Post-receive hook to deploy the code being pushed to production branch to a specific folder
#!/bin/bash
target_branch="production"
working_tree="PATH_TO_DEPLOY"
while read oldrev newrev refname
do
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then
@code100
code100 / ElasticSearch.php
Created April 21, 2018 10:03 — forked from hubgit/ElasticSearch.php
ElasticSearch class for PHP
<?php
// http://www.elasticsearch.com/docs/elasticsearch/rest_api/
class ElasticSearch {
public $index;
function __construct($server = 'http://localhost:9200'){
$this->server = $server;
}
@code100
code100 / Inflect.php
Created March 9, 2018 20:28 — forked from tbrianjones/Inflect.php
A PHP Class for converting English words between Singular and Plural.
<?php
// original source: http://kuwamoto.org/2007/12/17/improved-pluralizing-in-php-actionscript-and-ror/
/*
The MIT License (MIT)
Copyright (c) 2015
Permission is hereby granted, free of charge, to any person obtaining a copy
@code100
code100 / cli.args.php
Created January 28, 2018 21:27 — forked from jadb/cli.args.php
Parse PHP CLI arguments
http://pwfisher.com/nucleus/index.php?itemid=45
This command line option parser supports any combination of three types of options (switches, flags and arguments) and returns a simple array.
<?php
/**
* CommandLine class
*
* @package Framework
*/
/**