Skip to content

Instantly share code, notes, and snippets.

Aswa Paul giantas

Block or report user

Report or block giantas

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Jacajack
Jacajack / byzanz-record-region.sh
Created May 26, 2016
Record screen region with Byzanz and xrectsel
View byzanz-record-region.sh
#!/bin/bash
#Records selected screen region, with GUI
#This is combined version of GIF recording scripts, that can be found here: http://askubuntu.com/questions/107726/how-to-create-animated-gif-images-of-a-screencast
#Thanks to Rob W, and the other author (unmentioned), for creating this lovely scripts
#I do not own any rights to code I didn't write
# ~Jacajack
@gosukiwi
gosukiwi / openSUSE-init.md
Last active Feb 23, 2018
Things to do after installing openSUSE
View openSUSE-init.md
  1. Add packman packages
  2. Install Infinality
  3. Install "build essentials": sudo zypper in --type pattern devel_basis
  4. Install Linuxbrew (to install apps which might not be in zypper, or to install them in $HOME)
  5. Get Dropbox: sudo zypper in Dropbox && dropbox start -i
  6. Get Source Code Pro font
  7. Set "Source Code Pro" as default monospace font, "Roboto" as default sans-serif and "Droid Serif" as default serif.
  8. Configure gnome shell as login shell and set up base16
  9. Use numix theme with elementary icons or paper icons
  10. Set up development environment
@vadviktor
vadviktor / move.py
Created Aug 30, 2012
Python: move files to creation date named directories
View move.py
#!/usr/bin/python3
import os, time, shutil, sys
dir = sys.argv[1]
os.chdir(dir)
for f in os.listdir('.'):
ftime = time.gmtime(os.path.getmtime(f))
ctime_dir = str(ftime.tm_year) '-' str(ftime.tm_mon) '-' str(ftime.tm_mday)
if not os.path.isdir(ctime_dir):
os.mkdir(ctime_dir)
@pmdarrow
pmdarrow / gist:3427827
Created Aug 22, 2012
How to compile wkhtmltopdf static binary on Ubuntu 12.04
View gist:3427827
# These instructions were tested on Ubuntu 12.04 64bit
# Be prepared to wait a while...
sudo apt-get install openssl build-essential xorg libssl-dev libxrender-dev libxext-dev libpq-dev libx11-dev
git clone git://github.com/antialize/wkhtmltopdf.git
git clone git://gitorious.org/+wkhtml2pdf/qt/wkhtmltopdf-qt.git wkhtmltopdf-qt
cd wkhtmltopdf
mkdir static-build
ln -s ../wkhtmltopdf-qt static-build/qt
./scripts/static-build.sh
@rbrto
rbrto / elasticsearch.service
Created Feb 24, 2017
ElasticSearch Systemd file
View elasticsearch.service
#Developer : Anshul Patel
#Put the file in /etc/systemd/system
#Make sure that the elasticsearch and run directory have permission of appropriate user
#In order to start it during boot, sudo systemctl enable elasticsearch
[Unit]
Description=ElasticSearch Service
After=network.target
[Service]
@macieksk
macieksk / google_drive_util.py
Created Jul 2, 2014
A simple Python module to upload files to Google Drive file upload. Needs a file 'client_secrets.json' in the directory . The file can be obtained from https://console.developers.google.com/ -- under APIs&Auth/Credentials/Create Client ID for native application
View google_drive_util.py
## Simple Python module to upload files to Google Drive
# Needs a file 'client_secrets.json' in the directory
# The file can be obtained from https://console.developers.google.com/
# under APIs&Auth/Credentials/Create Client ID for native application
# To test usage:
# import google_drive_util
# google_drive_util.login()
# google_drive_util.test()
@giantas
giantas / dispatch.py
Created Oct 23, 2016 — forked from aortbals/dispatch.py
Synchronize two folders using python.
View dispatch.py
#! /usr/bin/python
# Dispatch - synchronize two folders
import os
import filecmp
import shutil
from stat import *
class Dispatch:
''' This class represents a synchronization object '''
@nagyv
nagyv / 0 - odoo logs to sentry
Last active Dec 5, 2018 — forked from avoine/gist:2912777
Script to send rsyslog message of OpenERP to Sentry
View 0 - odoo logs to sentry
This gist provides a simple setup to add Sentry logging to OpenERP/Odoo.
As Odoo's logging setup is rather limited, I'm using syslog to collect and forward logs to Sentry.
These scripts should run without any modification on an Ubuntu based server, assuming the paths and user names for openerp match with the ones in the `supervisord.conf` file.
To have rsyslog2sentry run fine, you'll need some python pagkages installed
$ pip install raven loggerglue
View RedisSessionStore
class RedisSessionStore(SessionStore):
def __init__(self, expire = 1800, key_prefix=''):
SessionStore.__init__(self)
self.redis = redis.Redis(tools.config.get('redis_host', 'localhost'),
int(tools.config.get('redis_port', 6379)),
int(tools.config.get('redis_dbindex', 1)),
password=tools.config.get('redis_pass', None))
self.path = session_path()
self.expire = expire
self.key_prefix = key_prefix
@giantas
giantas / docker_dedicated_filesystem.md
Created Jun 14, 2019 — forked from hopeseekr/docker_dedicated_filesystem.md
Putting Docker on its own pseudo filesystem
View docker_dedicated_filesystem.md

Docker on BTRFS is very buggy and can result in a fully-unusable system, in that it will completely butcher the underlying BTRFS filesystem in such a way that it uses far more disk space than it needs and can get into a state where it cannot even delete any image, requiring one to take drastic actions up to and including reformatting the entire affected BTRFS root file system.

According to the official Docker documentation:

btrfs requires a dedicated block storage device such as a physical disk. This block device must be formatted for Btrfs and mounted into /var/lib/docker/.

In my experience, you will still run into issues even if you use a dedicated partition. No, it seems it requires a standalone

You can’t perform that action at this time.