Skip to content

Instantly share code, notes, and snippets.

View psych0der's full-sized avatar

Mayank Bhola psych0der

View GitHub Profile
@psych0der
psych0der / GitHub-Forking.md
Created October 2, 2020 13:33 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@psych0der
psych0der / restart_bluetooth.sh
Created August 4, 2020 11:08 — forked from nicolasembleton/restart_bluetooth.sh
Restart Bluetooth Daemon on Mac OS X without restarting
#!/bin/bash
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport
version: 2
jobs:
build:
# The primary container is an instance of the first image listed. The job's commands run in this container.
docker:
- image: circleci/node
name: main
#- image: lambdatest/tunnel
#command: ['-user', 'xxxxxxxxx' , '-key', 'xxxxx', '-v']
steps:
@psych0der
psych0der / pull-request-template.md
Created April 16, 2019 11:19 — forked from Lordnibbler/pull-request-template.md
Sample Pull Request Template

Status

READY/IN DEVELOPMENT/HOLD

Migrations

YES | NO

Description

A few sentences describing the overall goals of the pull request's commits.

Related PRs

Keybase proof

I hereby claim:

  • I am psych0der on github.
  • I am psych0der (https://keybase.io/psych0der) on keybase.
  • I have a public key ASBWZUCCIDbEwEeYUsgyLdEgi5TXKAIZTxQkFrC7qFG6GAo

To claim this, I am signing this object:

def listFlattener(arg, *args, **kwargs):
""" Flattens a deeply nested list of integers. But only integers! """
output = list()
# check input type
if type(arg) != list:
raise Exception('Invalid input type. Only accepts list')
def extract_elements(input):
for i in input:
@psych0der
psych0der / start-celery-for-dev.py
Created April 14, 2018 04:33 — forked from chenjianjx/start-celery-for-dev.py
A python script which starts celery worker and auto reload it when any code change happens.
'''
A python script which starts celery worker and auto reload it when any code change happens.
I did this because Celery worker's "--autoreload" option seems not working for a lot of people.
'''
import time
from watchdog.observers import Observer ##pip install watchdog
from watchdog.events import PatternMatchingEventHandler
import psutil ##pip install psutil
import os
@psych0der
psych0der / fix_virtualenv
Created April 4, 2018 07:44 — forked from tevino/fix_virtualenv
Fix python virtualenv after python update
#!/usr/bin/env bash
ENV_PATH="$(dirname "$(dirname "$(which pip)")")"
SYSTEM_VIRTUALENV="$(which -a virtualenv|tail -1)"
echo "Ensure the root of current virtualenv:"
echo " $ENV_PATH"
read -p "‼️ Say no if you are not sure (y/N) " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
echo "♻️ Removing old symbolic links......"
@psych0der
psych0der / sysctl.conf
Created February 19, 2018 09:54 — forked from Poorvak/sysctl.conf
Linux Web Server Kernel Tuning
# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for
# an explanation about some of these parameters, and instructions for
# a few other tweaks outside this file.
# Protection from SYN flood attack.
net.ipv4.tcp_syncookies = 1
@psych0der
psych0der / ultimate-ut-cheat-sheet.md
Created September 21, 2017 08:23 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies