View get-lockscreen-wallpapers.ps1
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
Copy-Item -Force -Recurse $env:USERPROFILE\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets $env:USERPROFILE\Pictures\LockScreen_Wallpapers | |
Dir $env:USERPROFILE\Pictures\LockScreen_Wallpapers | rename-item -newname { [io.path]::ChangeExtension($_.name, "jpg") } | |
explorer $env:USERPROFILE\Pictures\LockScreen_Wallpapers |
View aws_lambda_callback_redirect.js
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
callback(null, { | |
statusCode: 307, | |
headers: { | |
Location: 'https://github.com/pirafrank', | |
} | |
}) |
View tasks.json
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
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "Serve", | |
"type": "shell", | |
"command": "bundle exec jekyll s", | |
"problemMatcher": [] |
View run_other_teams.ps1
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
# Read me: | |
# | |
# You need to do some setup before running this script. | |
# Check the link below. | |
# | |
# Run this script as admin in powershell. | |
# By the way if you run it in a standard powershell it will | |
# prompt to open a new shell as admin. | |
# |
View checkrun.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
function checkrun { | |
if [ $1 -ne 0 ]; then | |
echo "$2" | |
exit 2 | |
fi | |
} | |
function test1 { | |
echo "test1" && \ | |
echo "print 2" |
View symlink.ps1
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
function print($str) { | |
Write-Host "$str" | |
} | |
if ( $($args.Count) -ne 2 ) { | |
$scriptName = $MyInvocation.MyCommand.Name | |
print("Usage: .\$scriptName target symlink_name") | |
exit | |
} |
View ssh-copy-id.ps1
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
function print($str) { | |
Write-Host "$str" | |
} | |
if ( $($args.Count) -ne 2 -And $($args.Count) -ne 3 ) { | |
$scriptName = $MyInvocation.MyCommand.Name | |
print("Usage: .\$scriptName [args...] pubKeyFile user@host") | |
exit | |
} |
View docker_vol_dump.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
#!/bin/bash | |
if [ $# -ne 2 ]; then | |
echo "Usage: ./$0 tar_archive_name volume_name" | |
exit 1 | |
fi | |
tararchive="$1" | |
volname="$2" | |
BASEDIR="$HOME/docker_vol_exports" |
View vim_install.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
#!/bin/bash | |
# Remove old vim installs | |
sudo apt-get remove vim vim-runtime gvim vim-tiny \ | |
vim-common vim-gui-common vim-nox gvim | |
# install vim-gtk deps | |
sudo apt-get build-dep vim-gtk | |
# install some more deps |
View hetzner.js
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
// Your Hetzner API token | |
// Go to Cloud Console > [your project] > Security > API tokens | |
const token = "PUT_YOUR_TOKEN_HERE" // main | |
// urls | |
let listServersUrl = "https://api.hetzner.cloud/v1/servers" | |
let widget = await createWidget(listServersUrl) | |
if (config.runsInWidget) { | |
// The script runs inside a widget, so we pass our instance of ListWidget to be shown inside the widget on the Home Screen. |
NewerOlder