Skip to content

Instantly share code, notes, and snippets.

@bchecketts
bchecketts / placeFileInAllGithubRepos.php
Last active March 8, 2022 17:07
Quick script to place a single file in every repository in your Github organization
<?php
## Generate a Github user token at https://github.com/settings/tokens
$githubToken = 'EnterYourGithubTokenHere';
## Your organization name (from https://github.com/yourOrganizationName)
$organization = 'yourOrganizationName';
## Enter the name of the remote file you want to place
$remoteFile = "pull_request_template.md";
@baumandm
baumandm / GIF-Screencast-OSX.md
Last active November 3, 2023 07:18 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to Animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime and ffmpeg.

Forked from https://gist.github.com/dergachev/4627207. Updated to use a palette to improve quality and skip gifsicle.

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@cosmo0920
cosmo0920 / gist:c497e31692b03f1b8df6
Created June 24, 2015 15:39
Jenkins stack trace: embulk 0.6.12
A problem occurred while processing the request. Please check our bug tracker to see if a similar problem has already been reported. If it is already reported, please vote and put a comment on it to let us gauge the impact of the problem. If you think this is a new issue, please file a new issue. When you file an issue, make sure to add the entire stack trace, along with the version of Jenkins and relevant plugins. The users list might be also useful in understanding what has happened.
Stack trace
java.io.IOException: {"message":"You need at least read:org scope or user scope to list your organizations.","documentation_url":"https://developer.github.com/v3/orgs/#list-your-organizations"}
at org.kohsuke.github.Requester.handleApiError(Requester.java:496)
at org.kohsuke.github.Requester._to(Requester.java:245)
at org.kohsuke.github.Requester.to(Requester.java:191)
at org.kohsuke.github.GitHub.getMyOrganizations(GitHub.java:331)
at org.jenkinsci.plugins.GithubAuthenticationToken.<init>(GithubAuthentication
@sephiroth74
sephiroth74 / git pretty stat
Last active April 17, 2024 22:23
Show lines added/deleted and total commits per author in a period of time on all branches
git log --all --numstat --pretty="%H" --author="author" --since=1.year | awk 'NF==3 {plus+=$1; minus+=$2} NF==1 {total++} END {printf("lines added: +%d\nlines deleted: -%d\ntotal commits: %d\n", plus, minus, total)}'