Skip to content

Instantly share code, notes, and snippets.

curl -s -D - https://f000.backblaze.com/file/yevyev/gif/Yev-pushups_sm.gif -o /dev/null
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Cache-Control: max-age=0, no-cache, no-store
x-bz-file-name: gif/Yev-pushups_sm.gif
x-bz-file-id: 4_z0c383f22d5dcffcf4cf40519_f1085ae37d422cdab_d20151125_m180511_c000_v0001014_t0023
x-bz-content-sha1: 874b8b3c87da9ce75fc1a20f54bb56a4d228c0fb
Accept-Ranges: bytes
x-bz-info-src_last_modified_millis: 1446844170000
Content-Type: image/gif
./build.bash
# github.com/mholt/caddy/caddy/https
caddy/https/client.go:37: cannot use &leUser (type *User) as type acme.User in argument to acme.NewClient:
*User does not implement acme.User (wrong type for GetPrivateKey method)
have GetPrivateKey() crypto.PrivateKey
want GetPrivateKey() *rsa.PrivateKey
caddy/https/https.go:407: undefined: acme.EC384
@jahands
jahands / Sevadus-Vods.txt
Last active February 25, 2016 20:02
A list of all vods of Sevadus on Twitch.tv
http://www.twitch.tv/sevadus/v/3591449
http://www.twitch.tv/sevadus/v/3592920
http://www.twitch.tv/sevadus/v/3593556
http://www.twitch.tv/sevadus/v/3593564
http://www.twitch.tv/sevadus/v/3595318
http://www.twitch.tv/sevadus/v/3596316
http://www.twitch.tv/sevadus/v/3597589
http://www.twitch.tv/sevadus/v/3599818
http://www.twitch.tv/sevadus/v/3602718
http://www.twitch.tv/sevadus/v/3604021
Get-ADGroup -Filter { Name -like "*_Managers" } | select -ExpandProperty Name | foreach{
Add-ADGroupMember $_ User
}
@jahands
jahands / Get-DirHash.ps1
Last active November 18, 2024 08:38
Get hash of entire directory in powershell.
Function Get-DirHash {
[Cmdletbinding()]
Param(
[Parameter(Mandatory=$true)]
[ValidateScript({
if(Test-Path -Path $_ -ErrorAction SilentlyContinue)
{
return $true
}
else
@jahands
jahands / strart-backup.sh
Created February 6, 2016 18:40
My backup script
#!/bin/bash
PATH=$PATH:/usr/local/bin
H=/home/git
GOGS=$H/gogs
# run postgres dump
docker exec gogs-postgres pg_dump -U gogs -Fc gogs -f /var/pgbackup/gogs.dump
sleep 600
hb backup \
-c /home/git/hb \
-D1g \
@jahands
jahands / WebLinkScraper.ps1
Created February 2, 2016 23:36
Basic web scraper.
$urlRegex="https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)"
$links=@()
function Scrape([string]$Url){
(wget $Url).Links.href | Where-Object {$_ -match $urlRegex -and -not $global:links.Contains($_)} | ForEach-Object{
$global:links+=$_
echo $($global:links.Count.ToString() + " : " + $_)
Scrape -Url $_
}
}
Scrape -Url "https://technet.microsoft.com/en-us/magazine/2007.11.powershell.aspx"
@jahands
jahands / Twitch.ps1
Last active January 23, 2016 18:33
A wrapper for livestreamer which adds looping functionality
[CmdletBinding()]
Param(
[Parameter(Mandatory=$true,Position=1)]
[string]$StreamName,
[Parameter(Position=2)]
[int]$Quality=1,
[Parameter()]
[bool]$Retry=$true,
[Parameter()]
[int]$RetryTimeout=10