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
# Version 1.7.0 | |
$gistUrl = "https://api.github.com/gists/81e7d1be5e7302c281ccc9b04134949e" | |
$gistFileName = '$profile' # Change this to match the filename in your Gist | |
$checkInterval = 4 # Check for updates every 4 hours | |
$updateCheckFile = [System.IO.Path]::Combine($HOME, ".profile_update_check") | |
$versionRegEx = "# Version (?<version>\d+\.\d+\.\d+)" | |
$localProfilePath = $Profile.CurrentUserCurrentHost | |
# Last update check timestamp |
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 | |
/** | |
* Import SQL files from a directory | |
* | |
* @author joshcangit, https://github.com/joshcangit | |
* @author Roy-Orbison, https://github.com/Roy-Orbison | |
*/ | |
class AdminerImportFromDir { |
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 | |
currentAttempt=0 | |
totalAttempts=10 | |
delay=15 | |
while [ $currentAttempt -lt $totalAttempts ] | |
do | |
currentAttempt=$(( $currentAttempt + 1 )) | |
echo "Attempt $currentAttempt of $totalAttempts..." |
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
<video id="player" autoplay muted playsinline> </video> | |
<button id="capture">Capture</button> | |
<canvas id="canvas" width=320 height=240></canvas> | |
<script> | |
const player = document.getElementById('player'); | |
const canvas = document.getElementById('canvas'); | |
const context = canvas.getContext('2d'); | |
const captureButton = document.getElementById('capture'); | |
const constraints = { |
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 | |
/** | |
* Import SQL files from a directory | |
* | |
* @author joshcangit, https://github.com/joshcangit | |
* @author Roy-Orbison, https://github.com/Roy-Orbison | |
*/ | |
class AdminerImportFromFolder { |
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
@echo off | |
rem sourced from http://stackoverflow.com/questions/5273937/how-to-replace-substrings-in-windows-batch-file | |
setlocal enabledelayedexpansion | |
set INTEXTFILE=test.txt | |
set OUTTEXTFILE=test_out.txt | |
set SEARCHTEXT=bath | |
set REPLACETEXT=hello | |
set OUTPUTLINE= | |
for /f "tokens=1,* delims=¶" %%A in ( '"type %INTEXTFILE%"') do ( |