Skip to content

Instantly share code, notes, and snippets.

View qnub's full-sized avatar
👁️‍🗨️

Vadim Lopatiuk qnub

👁️‍🗨️
View GitHub Profile
import requests
from requests.auth import HTTPBasicAuth
import re
from StringIO import StringIO
import urllib
JIRA_URL = 'https://your-jira-url.tld/'
JIRA_ACCOUNT = ('jira-username', 'jira-password')
# the JIRA project ID (short)
JIRA_PROJECT = 'PRO'
@BojanStipic
BojanStipic / fonts.conf
Last active April 27, 2019 13:56
Linux color emoji
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<alias>
<family>sans-serif</family>
<prefer>
<family>NotoSans</family>
<family>NotoColorEmoji</family>
<family>NotoEmoji</family>
</prefer>
@ingramchen
ingramchen / gist:e2af352bf8b40bb88890fba4f47eccd0
Created April 5, 2016 12:58
ffmpeg convert gif to mp4, for best cross browser compatibility
### Full command line options
```
ffmpeg -f gif -i FOO.gif -pix_fmt yuv420p -c:v libx264 -movflags +faststart -filter:v crop='floor(in_w/2)*2:floor(in_h/2)*2' BAR.mp4
```
### Notie
* output mp4 is encoded with h264, support Firefox/Chrome/Safari in Windows, Mac OSX, Android, and iOS.
@cstrap
cstrap / django_haystack_testing.py
Last active September 14, 2018 13:07 — forked from justquick/django_haystack_testing
Django haystack testing index
import haystack
from django.core.management import call_command
from django.test.utils import override_settings
TEST_INDEX = {
'default': {
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
'URL': 'http://127.0.0.1:9200/',
@smrchy
smrchy / docker.sh
Created November 5, 2014 15:14
Docker
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@romainl
romainl / gist:9970697
Last active June 1, 2024 03:21
How to use Tim Pope's Pathogen

How to use Tim Pope’s Pathogen

I’ll assume you are on Linux or Mac OSX. For Windows, replace ~/.vim/ with $HOME\vimfiles\ and forward slashes with backward slashes.

The idea

Vim plugins can be single scripts or collections of specialized scripts that you are supposed to put in “standard” locations under your ~/.vim/ directory. Syntax scripts go into ~/.vim/syntax/, plugin scripts go into ~/.vim/plugin, documentation goes into ~/.vim/doc/ and so on. That design can lead to a messy config where it quickly becomes hard to manage your plugins.

This is not the place to explain the technicalities behind Pathogen but the basic concept is quite straightforward: each plugin lives in its own directory under ~/.vim/bundle/, where each directory simulates the standard structure of your ~/.vim/ directory.

@mendelgusmao
mendelgusmao / btsync
Last active March 4, 2021 15:37
init.d script for btsync (based on another script built to run dropbox)
#!/bin/sh
### BEGIN INIT INFO
# Provides: btsync
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Multi-user daemonized version of btsync.
@jadeatucker
jadeatucker / HOWTODMG.md
Last active July 10, 2024 23:35
How to create a "DMG Installer" for Mac OS X

Creating a "DMG installer" for OS X

A DMG Installer is convenient way to provide end-users a simple way to install an application bundle. They are basically a folder with a shortcut to the Applications directory but they can be customized with icons, backgrounds, and layout properties. A DMG file (.dmg) is a Mac OS X Disk Image file and it is used to package files or folders providing compression, encryption, and read-only to the package.

##Creating the DMG file #Disk Utility

@marekjelen
marekjelen / gist:3256675
Created August 4, 2012 10:47
New PostgreSQL on OpenShift
POSTGRESQL_VERSION="9.1.4"
# Installing DB (one-time)
cd $OPENSHIFT_DATA_DIR
wget http://ftp.postgresql.org/pub/source/v${POSTGRESQL_VERSION}/postgresql-${POSTGRESQL_VERSION}.tar.gz
tar xf postgresql-${POSTGRESQL_VERSION}.tar.gz
rm postgresql-${POSTGRESQL_VERSION}.tar.gz
@averrin
averrin / gist:2794727
Created May 26, 2012 17:31
Oh My Doc!
import pyparsing as p
import inspect
import pprint
def process(fn, inline=True, badges=True, multiline=True, tag="", mtag="", debug=False, skip_lines=2):
"""
You can use semicolon tags or specify pyparsing tag in function call
for example, for @tag:
'@' + p.Word(p.alphas + '_').setResultsName('tag')