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
@cecilemuller
cecilemuller / letsencrypt_2019.md
Last active Nov 14, 2019
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)
View letsencrypt_2019.md

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@rvl
rvl / git-pushing-multiple.rst
Created Feb 9, 2016
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.
View git-pushing-multiple.rst

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@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
@tliron
tliron / rest.py
Last active Jul 11, 2019
Simple and functional REST server for Python (2.7) using no dependencies beyond the Python standard library.
View rest.py
#!/usr/bin/env python
'''
Simple and functional REST server for Python (2.7) using no dependencies beyond the Python standard library.
Features:
* Map URI patterns using regular expressions
* Map any/all the HTTP VERBS (GET, PUT, DELETE, POST)
* All responses and payloads are converted to/from JSON for you
View Good-CONTRIBUTING.md-template.md

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
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
@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
@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()
@Atem18
Atem18 / gist:4696071
Last active Nov 5, 2019 — forked from evildmp/gist:3094281
Tutorial to seting up a django website in production.
View gist:4696071

Set up Django, Nginx and Gunicorn in a Virtualenv controled by Supervisor

Steps with explanations to set up a server using:

  • Virtualenv
  • Virtualenvwrapper
  • Django
  • Gunicorn
You can’t perform that action at this time.