View getGithubFile.php
This file contains 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
<?php | |
use \GuzzleHttp\Client; | |
use \GuzzleHttp\Psr7; | |
use \GuzzleHttp\Exception\RequestException; | |
/** | |
* Use guzzle to get a single file from github and return it as a string. | |
* | |
* @param string $url The path of the file to fetch | |
* @return string |
View wsl_disable_bell.sh
This file contains 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
#!/usr/bin/env bash | |
echo "set bell-style none" >> ~/.inputrc |
View drush_user_delete_example.php
This file contains 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
<?php | |
// We want to preserve all accounts from a selection of email domains. | |
// We want to preserve system accounts with UIDs 0 and 1 | |
// We want to delete all other accounts which are: | |
// - disabled, AND | |
// - have never been used, AND | |
// - have never been logged into | |
// | |
// We also want to use Drupal's user_delete_multiple() function so that | |
// all the necessary hooks are called throughout the system. |
View git_tricks.sh
This file contains 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
## discard modifications in a directory | |
git checkout -- Gemfile # reset specified path | |
git checkout -- lib bin # also works with multiple arguments | |
## Undo local commits | |
git reset HEAD~2 # undo last two commits, keep changes | |
git reset --hard HEAD~2 # undo last two commits, discard changes | |
## Remove a file from the repo, but keep it in the filesystem | |
git reset filename # or git remove --cached filename |
View docx2md.sh
This file contains 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
#!/usr/bin/env bash | |
find . -name "*.docx" | while read file; do | |
pandoc -s "$file" -t markdown -o "./converted/$file.md" | |
done | |
cat ./converted/*.md > ./converted/compiled.md |
View gist:633e1cf1443fbef0b7b60cc4df3e5bbf
This file contains 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
### Keybase proof | |
I hereby claim: | |
* I am imonroe on github. | |
* I am imonroe (https://keybase.io/imonroe) on keybase. | |
* I have a public key ASD8yUdUlLyYC3kCM_YZb0J0FPfcNYyzHIucefCQlJ188Qo | |
To claim this, I am signing this object: |