This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Taken from https://technet.microsoft.com/en-us/library/hh825258.aspx | |
| Param | |
| ( | |
| $ImageName | |
| ) | |
| dism /Export-Image ` | |
| /SourceImageFile:${ImageName}.swm ` | |
| /SWMFile:${ImageName}*.swm ` | |
| /SourceIndex:1 ` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # This script will install a Git pre-commit hook that prevents commits to the local master branch. | |
| # Single repo installation: | |
| # curl -fL https://gist.github.com/vintagesucks/b6d8cd37a88e8e9eeef9ebe92f1c2dd9/raw/install-pre-commit.sh | sh | |
| # Uninstall: | |
| # rm .git/hooks/pre-commit | |
| GIT_DIR=`git rev-parse --git-common-dir 2> /dev/null` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var request = require('request'); | |
| var unzip = require('unzip'); | |
| var csv2 = require('csv2'); | |
| var fs = require('fs'); | |
| var wstream = fs.createWriteStream('alexa.txt'); | |
| request.get('http://s3.amazonaws.com/alexa-static/top-1m.csv.zip') | |
| .pipe(unzip.Parse()) | |
| .on('entry', function (entry) { | |
| entry.pipe(csv2()).on('data', function (data) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for(var links=document.links,i=0,linksLength=links.length;i<linksLength;i++)links[i].hostname!=window.location.hostname&&(links[i].target="_blank"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| #https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md | |
| EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig) | |
| php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
| ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');") | |
| if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ] | |
| then | |
| >&2 echo 'ERROR: Invalid installer signature' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| :: Author: Nikolas Evers | |
| :: GitHub: https://github.com/vintagesucks | |
| :: About: .bat file to display current Windows version, release branch and build number in PowerShell | |
| start powershell.exe -noexit -Command "Write-Host Product: (((Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name ProductName).ProductName)) `nBranch:`t(((Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name BuildBranch).BuildBranch))`nBuild:`t(((Get-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion' -Name CurrentBuild).CurrentBuild))" |