Skip to content

Instantly share code, notes, and snippets.

@jdraths
jdraths / GitHub-Forking.md
Created Apr 29, 2021 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow
View GitHub-Forking.md

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

@jdraths
jdraths / GitPullHere.sh
Last active Jan 22, 2021 — forked from donarb/GitCloneHere.sh
Automator service to clone Git repos in Mac Finder
View GitPullHere.sh
# Use this to quickly create a git repo in a Mac Finder folder
#
# You need to create an Automator service:
# - Open Automator, choose to create a new Service
# - At the top, select Service receives selected "Folders" in "Finder"
# - From the list at the left, choose Library/Utilities, then drag the
# Run Shell Script action to the workarea
# - Paste the script below into the script area
# - Make sure you set the 'Pass input:' selection to "as arguments"
# - Save the service with an easy to find name, I used "Git Clone Here"
View ipset
# install it
apt-get install ipset
# create a blacklist
ipset create blacklist hash:ip hashsize 4096
# add the blacklist to your iptables rules
iptables -I INPUT -m set --match-set blacklist src -j DROP
iptables -I FORWARD -m set --match-set blacklist src -j DROP
View chipsetinfo.txt
Software Versions:
CoreWLAN: 13.0 (1370.8)
CoreWLANKit: 13.0 (1370.8)
Menu Extra: 13.0 (1376.2)
System Information: 12.0 (1300.2)
IO80211 Family: 12.0 (1200.12.2)
Diagnostics: 1.0 (805)
AirPort Utility: 6.3.9 (639.6)
Interfaces:
en0:
@jdraths
jdraths / awesome-nginx.conf
Created Sep 19, 2018 — forked from vjt/awesome-nginx.conf
*AWESOME* nginx configuration for Ruby/Rack web applications
View awesome-nginx.conf
#
# mmm m m mmm mmm mmm mmmmm mmm
# " # "m m m" #" # # " #" "# # # # #" #
# m"""# #m#m# #"""" """m # # # # # #""""
# "mm"# # # "#mm" "mmm" "#m#" # # # "#mm"
#
# nginx configuration For Ruby/Rack web applications
#
# Cooked up with style, care and a bit of *secret*
# nerdy spice. :-)
View Google Sheets API Zebra Striping (request body)
// params need to be snake cased with ruby api
{
"requests":
[
{
"setBasicFilter": {
"filter":
{
"range":
{
View ghostscript_service.rb
# [putting-together-pdf-files](https://www.linux.com/news/putting-together-pdf-files)
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdffile1.pdf file2.pdf
# \t
# gs -- starts the Ghostscript program\t
# -dBATCH -- once Ghostscript processes the PDF files, it should exit. If you don't include this option, Ghostscript will just keep running\t
# -dNOPAUSE -- forces Ghostscript to process each page without pausing for user interaction\t
# -q -- stops Ghostscript from displaying messages while it works\t
# -sDEVICE=pdfwrite -- tells Ghostscript to use its built-in PDF writer to process the files\t
@jdraths
jdraths / poppler_service.rb
Last active May 12, 2017
Extract data from pdf with poppler
View poppler_service.rb
=begin
[REFERENCE](https://linux.die.net/man/1/pdftotext)
$ brew install poppler
> `pdftotext -h`
pdftotext version 0.48.0
Copyright 2005-2016 The Poppler Developers - http://poppler.freedesktop.org
Copyright 1996-2011 Glyph & Cog, LLC
Usage: pdftotext [options] <PDF-file> [<text-file>]
-f <int> : first page to convert
-l <int> : last page to convert