Skip to content

Instantly share code, notes, and snippets.

View osminogin's full-sized avatar
🇷🇺
Working from home

Vladimir Osintsev osminogin

🇷🇺
Working from home
View GitHub Profile
@tobert
tobert / gist:765867
Created January 5, 2011 03:04
LXC Config for Puppet testing on CentOS 5.x
lxc.utsname = test
lxc.rootfs = /lxc/test/rootfs
lxc.cgroup.cpuset.cpus = 0,1
lxc.cgroup.cpu.shares = 500
lxc.network.type = macvlan
lxc.network.flags = up
lxc.network.link = eth0
lxc.network.hwaddr = 4a:49:43:49:79:bf
lxc.network.ipv4 = 192.168.122.10/24
@osminogin
osminogin / downgrade-php53.sh
Created April 29, 2011 04:53
Shell script to automatic downgrade PHP 5.3 to PHP 5.2 in Debian and Ubuntu.
#!/bin/sh
#
# Copyright (c) 2011, Vladimir Osintsev
#
# Trying to make a universal script that will be suitable on Debian
# and Ubuntu systems (supporting several versions). This script generates
# necessary configuration files in /etc/apt and perform PHP downgrade
# Get distribution and release name
@hofmannsven
hofmannsven / README.md
Last active June 4, 2024 04:25
Git CLI Cheatsheet
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active June 7, 2024 01:58
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 8, 2024 05:20
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@magnetikonline
magnetikonline / README.md
Last active November 25, 2023 13:59
Nginx & PHP-FPM systemd services.

Nginx & PHP-FPM systemd services

A basic set of systemd units for starting Nginx and PHP-FPM daemons on system startup.

  • Ensures Nginx web server has started before the PHP-FPM process.
  • Nginx pid file placed at /run/nginx.pid.
  • PHP-FPM pid file placed at /run/php7/php-fpm.pid, PHP7 PHP-FPM config at /etc/php7.
  • Based on usage with Ubuntu 16.04LTS / 18.04LTS.

Unit files are placed in /etc/systemd/system and enabled with:

@rjz
rjz / ngrok_hostname.sh
Created August 9, 2016 16:20
Get ngrok hostname from command line
#!/bin/sh
# ngrok's web interface is HTML, but configuration is bootstrapped as a JSON
# string. We can hack out the forwarded hostname by extracting the next
# `*.ngrok.io` string from the JSON
#
# Brittle as all get out--YMMV. If you're still reading, usage is:
#
# $ ./ngrok_hostname.sh <proto> <addr>
#
@ei-grad
ei-grad / output.txt
Created October 28, 2016 16:48
Python multiprocessing.Queue sucks
zmq: 2.904726
queue: 12.812472
@jmvrbanac
jmvrbanac / gunicorn_options.yml
Last active August 26, 2023 18:13
Capture Client Certificate CN from Gunicorn
bind: 0.0.0.0:8000
workers: 1
worker_class: "example.worker:CustomWorker"
timeout: 30
ca_certs: ca.crt
certfile: server.crt
keyfile: server.key
cert_reqs: 2
do_handshake_on_connect: true
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 8, 2024 13:20
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example