![]() |
| /** | |
| * Prompt and filter a PR's changed files by the given extension(s). | |
| */ | |
| var els=document.getElementsByClassName('user-select-contain'); | |
| var input = prompt('File extension(s), comma separated'); | |
| els = [].forEach.call(els, function(el) { | |
| var parent = el; | |
| while (parent && !parent.classList.contains('js-details-container')) { |
In response to a StackOverflow question:
This is code to build a Direct3D wrapper DLL, intercepting all calls to Direct3D interface functions so that you can draw your own objects to display over the game. Just plop the DLL into the same folder as the game's executable, and it should load it as if it were the real d3d9.dll file. It still forwards all calls to the real one in system32, just allows stuff to happen in between. original stackoverflow answer
Get Git log in JSON format
git log --pretty=format:'{%n "commit": "%H",%n "abbreviated_commit": "%h",%n "tree": "%T",%n "abbreviated_tree": "%t",%n "parent": "%P",%n "abbreviated_parent": "%p",%n "refs": "%D",%n "encoding": "%e",%n "subject": "%s",%n "sanitized_subject_line": "%f",%n "body": "%b",%n "commit_notes": "%N",%n "verification_flag": "%G?",%n "signer": "%GS",%n "signer_key": "%GK",%n "author": {%n "name": "%aN",%n "email": "%aE",%n "date": "%aD"%n },%n "commiter": {%n "name": "%cN",%n "email": "%cE",%n "date": "%cD"%n }%n},'The only information that aren't fetched are:
%B: raw body (unwrapped subject and body)%GG: raw verification message from GPG for a signed commit
$/
artifacts/
build/
docs/
lib/
packages/
samples/
src/
tests/
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.
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
| // ==UserScript== | |
| // @name gist-editor-resize-userscript | |
| // @namespace https://gist.github.com/ | |
| // @version 0.1 | |
| // @description Automatically resize the gist editor for easier editing. | |
| // @match http*://gist.github.com/* | |
| // @copyright 2013+ Joel Day - blog.dayjo.org | |
| // ==/UserScript== | |
| var textareas = document.querySelectorAll('textarea.file_contents'); |
| let fizzBuzz x = | |
| match x with | |
| | _ when (x % 15) = 0 -> "FizzBuzz" | |
| | _ when (x % 3) = 0 -> "Fizz" | |
| | _ when (x % 5) = 0 -> "Buzz" | |
| | _ -> "" | |
| let fizzBuzzTo max = | |
| [1..max] | |
| |> List.iter (fun number -> printfn "%d %s" number (fizzBuzz number)) |
| <Project> | |
| <!-- the usual stuff --> | |
| <!-- BEGIN disable default compile and copy binary behaviour --> | |
| <Target Name="CoreCompile" /> | |
| <PropertyGroup> | |
| <SkipCopyBuildProduct>true</SkipCopyBuildProduct> | |
| </PropertyGroup> | |
| <!-- END disable default compile and copy binary behaviour --> |
| <Project | |
| xmlns="http://schemas.microsoft.com/developer/msbuild/2003" | |
| ToolsVersion="4.0" | |
| DefaultTargets="Demo" > | |
| <Target Name="Demo"> | |
| <PropertyGroup> | |
| <CurrentDate>$([System.DateTime]::Now.ToString(yyyyMMdd-mmss))</CurrentDate> | |
| </PropertyGroup> |
