Skip to content

Instantly share code, notes, and snippets.

View kmmbvnr's full-sized avatar
💭
#StopPutin #StopWar

Mikhail Podgurskiy kmmbvnr

💭
#StopPutin #StopWar
View GitHub Profile
curl -XPOST -d "source=`git config user.name`&from_address=`git config user.email`&subject=pushed to production&content=`git log --pretty=format:'%s %H' -n 1`" https://api.flowdock.com/v1/messages/team_inbox/YOUR_TOKEN_GOES_HERE
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active March 20, 2025 17:17
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@piranha
piranha / пше
Last active January 3, 2025 20:56
пше гит, прошу пана
#!/usr/bin/env python
# -*- mode: python, coding: utf-8 -*-
#
# This incredible piece of code makes git a bit Polish, a bit Western Ukrainian,
# пше прошу пана
# Joke is based on fact that 'git' is 'пше' in qwerty/йцукен layouts
#
# (c) 2013 Alexander Solovyov under terms of WTFPL
import sys
@alextucker
alextucker / README.md
Last active March 12, 2021 13:21
Installing Dokku and Deploying a Django App
@justincarroll
justincarroll / bootstrap-masonry-template.htm
Last active August 15, 2020 16:48
This is my template for using Masonry 3 with Bootstrap 3. For those of you who follow this gist a lot has changed since Bootstrap 2.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Masonry Template</title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" href="style.css">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans+Caption:400,700">
@Lucretiel
Lucretiel / tail_recursion.py
Last active December 15, 2015 16:59
Decorator to enable tail recursion in python.
from functools import wraps
class tail(object):
def __init__(self, *args, **kwargs):
try:
self.func = args[0]._tail_function
except AttributeError:
self.func = args[0]
self.args = args[1:]
self.kwargs = kwargs
@justincampbell
justincampbell / after.sh
Created March 1, 2013 17:45
Jenkins + GitHub Commit Status API
if [[ $BUILD_STATUS == "success" ]]
then
export STATUS="success"
else
export STATUS="failure"
fi
curl "https://api.github.com/repos/justincampbell/my_repo/statuses/$GIT_COMMIT?access_token=abc123" \
-H "Content-Type: application/json" \
-X POST \
@creotiv
creotiv / django_browser_detection_middleware.py
Created September 13, 2012 12:01
Django browser detection middleware
import re
"""
Detect browser and it's version.
Now it works only for few moct common browsers. Full list of browsers and
theire user-agent you can find here: http://www.useragentstring.com/pages/useragentstring.php
Version: 0.1
Author: Andrey Nikishaev
Site: http://creotiv.in.ua/
@kravchik
kravchik / Executor.java
Created June 20, 2012 20:26
Primitively simple lisp implementation
package simple;
import par.ParParser;
import java.util.List;
import java.util.Map;
import static yk.Util.copy;
import static yk.Util.list;
import static yk.Util.map;
@oodavid
oodavid / README.md
Created March 26, 2012 17:05
Backup MySQL to Amazon S3

Backup MySQL to Amazon S3

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)

Sister Document - Restore MySQL from Amazon S3 - read that next

1 - Install s3cmd

this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc