Skip to content

Instantly share code, notes, and snippets.

View basejumpa's full-sized avatar
⌨️

Alexander Mann-Wahrenberg basejumpa

⌨️
  • VITRONIC Group
  • Germany, Wiesbaden
  • 03:22 (UTC +02:00)
  • LinkedIn in/basejumpa
View GitHub Profile
@technoweenie
technoweenie / github_oauth_busy_developer_guide.md
Created May 30, 2010 18:34
GitHub OAuth Busy Developer's Guide

GitHub OAuth Busy Developer's Guide

This is a quick guide to OAuth2 support in GitHub for developers. This is still experimental and could change at any moment. This Gist will serve as a living document until it becomes finalized at Develop.GitHub.com.

OAuth2 is a protocol that lets external apps request authorization to private details in your GitHub account without getting your password. All developers need to register their application before getting started.

Web Application Flow

  • Redirect to this link to request GitHub access:
@jpoehls
jpoehls / wrapper.bat
Last active January 16, 2023 22:37
Batch file wrapper for a PowerShell script. Wraps execution of a PowerShell script inside a Windows batch file.
@echo off
:: Execute the PS1 file with the same name as this batch file.
set filename=%~d0%~p0%~n0.ps1
if exist "%filename%" (
PowerShell.exe -NoProfile -NonInteractive -NoLogo -ExecutionPolicy Unrestricted -Command "& '%filename%'"
:: Collect the exit code from the PowerShell script.
set err=%errorlevel%
@mojavelinux
mojavelinux / Writing Tools Writeup.markdown
Created January 30, 2012 18:56 — forked from matthewmccullough/Writing Tools Writeup.md
How To Write A Technical Book (One Man's Modest Suggestions)
@ruxkor
ruxkor / git-relevant-files.py
Created February 1, 2012 01:06
get the most changed files of a git repository by analyzing its log
#!/usr/bin/env python
# Usage:
# pipe, or pass as a file something identical to the
# following command:
#
# git log --pretty="format:COMMIT %h %at %f" --numstat
#
#
#
@waylan
waylan / subprocess_pipe.md
Created April 10, 2012 19:12
Writing to a python subprocess pipe

Here's a few things I tried to write output to a python subprocess pipe.

from subprocess import Popen, PIPE

p = Popen('less', stdin=PIPE)
for x in xrange(100):
    p.communicate('Line number %d.\n' % x)
@digitaljhelms
digitaljhelms / gist:4287848
Last active May 25, 2024 22:25
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@nichtich
nichtich / README.md
Last active May 20, 2024 07:48 — forked from oodavid/README.md
How to automatically deploy from GitHub

Deploy your site with git

This gist assumes:

  • you have an online remote repository (github / bitbucket etc.)
  • you have a local git repo
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by Apache
  • the Apache user is named www-data (may be apache on other systems)
@kenaniah
kenaniah / post-fetch.sh
Last active August 14, 2018 08:44
Git post-receive (remote push) and post-fetch (local pull) hooks for trac. Since post-fetch is not a real hook, it must be called manually after every fetch.
#!/bin/bash
# This isn't really a git hook, but it's manually called it after every fetch run.
# This script essentially wraps the actual post-receive hook.
# Build the standard input for the post-receive hook
cat refs/heads/* | paste TRAC_HEAD - > post-fetch.tmp
find refs/heads/* | paste post-fetch.tmp - | awk '{print $1, $2, $3}' > post-fetch.stdin
# Call the post-receive hook just like the commits were pushed
@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet
@jimCresswell
jimCresswell / jenkinsParsingForGithubPayload
Created October 18, 2013 09:00
Jenkins script in Groovy to parse a Github web hook payload for the commit that triggered the pull request that triggered the service hook ... and then set that as a build variable that can be used in further Jenkins scripts or parameterised jobs. See http://chloky.com/github-pull-req-webhook/ and https://gist.github.com/bjhess/2726012 for setti…
import hudson.model.*
def payloadString = build.buildVariableResolver.resolve("payload")
payloadObject = new groovy.json.JsonSlurper().parseText(payloadString)
targetCommit = payloadObject.pull_request.head.sha
build.addAction(new ParametersAction(new StringParameterValue('targetCommit', targetCommit)))