Skip to content

Instantly share code, notes, and snippets.

View mrpandat's full-sized avatar
🍜
NomNomNom

KagXaef mrpandat

🍜
NomNomNom
View GitHub Profile
@tsabat
tsabat / supervisor.conf
Created December 28, 2011 15:09
Sample supervisor config file
; Sample supervisor config file.
[unix_http_server]
file=/tmp/supervisor.sock ; (the path to the socket file)
;chmod=0700 ; sockef file mode (default 0700)
;chown=nobody:nogroup ; socket file uid:gid owner
;username=user ; (default is no username (open server))
;password=123 ; (default is no password (open server))
;[inet_http_server] ; inet (TCP) server disabled by default
@pixelhandler
pixelhandler / pre-push.sh
Last active May 17, 2024 12:12
Git pre-push hook to prevent force pushing master branch
#!/bin/sh
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...
# 1. Copy the file into your repo at `.git/hooks/pre-push`
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push`
@Tyriar
Tyriar / random_from_list.sql
Created July 17, 2014 13:18
Various T-SQL database obfuscation scripts
-- randomise a column's values using a list of specified values
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'ShuffleTable')
DROP TABLE [ShuffleTable];
IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'InsertDataListTable')
DROP TABLE [InsertDataListTable];
GO
CREATE TABLE [InsertDataListTable] ([TargetColumn] NVARCHAR(50));
@BaptisteDixneuf
BaptisteDixneuf / OVH_Public_Cloud_Storage_API_OpenStack_Swift.md
Created June 25, 2015 21:23
OVH Public Cloud Object Storage et API OpenStack Swift
@cbednarski
cbednarski / factorio.md
Last active April 3, 2024 01:14
Host a factorio server
@DianaEromosele
DianaEromosele / Change "origin" of your GIT repository
Created August 7, 2016 00:31
Change "origin" of your GIT repository
$ git remote rm origin
$ git remote add origin git@github.com:aplikacjainfo/proj1.git
$ git config master.remote origin
$ git config master.merge refs/heads/master
@ravibhure
ravibhure / git_rebase.md
Last active June 25, 2024 13:44
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream

@mdang
mdang / ES6_PRACTICE.md
Last active February 12, 2021 18:23
ES6 Practice

ES6 Practice

Convert the following ES5 code to ES6.

Template Literals

// Template literals
var li = '<li>' +
  '<div class="row">' +
@mihow
mihow / load_dotenv.sh
Last active June 14, 2024 02:15
Load environment variables from dotenv / .env file in Bash
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
@pokisin
pokisin / Uninstall.md
Last active June 8, 2024 07:53
Uninstall git, ubuntu

Uninstall git

To remove just git package itself from Ubuntu 14.04 execute on terminal:

$ sudo apt-get remove git

Uninstall git and it's dependent packages

To remove the git package and any other dependant package which are no longer needed from Ubuntu Trusty.

$ sudo apt-get remove --auto-remove git