Skip to content

Instantly share code, notes, and snippets.

@deevus
deevus / synomanager.py
Created January 25, 2014 09:44
Small Python script to remove invalid paths from the Synology Media Server database
#!/usr/bin/python
# synomanager.py
# Usage: ./synomanager.py [-r]
# Running without any arguments will notify you of invalid paths
# only. To remove the invalid paths run with -r or --remove
import psycopg2
import sys
import os.path
import getopt
@deevus
deevus / build.ps1
Created April 21, 2015 07:22
Cross Compile GNU Hello using Docker
$pkg = "hello-2.10"
$file = "$pkg.tar.gz"
# get dockerfile
invoke-webrequest "https://raw.githubusercontent.com/deevus/docker-mxe/develop/Dockerfile" -outfile "Dockerfile"
# get package
if(!(test-path $file)) {
invoke-webrequest "http://gnu.mirror.uber.com.au/hello/$file" -outfile $file
}

Keybase proof

I hereby claim:

  • I am deevus on github.
  • I am deevus (https://keybase.io/deevus) on keybase.
  • I have a public key ASBC0wH04xNlx0rCaRu_zK0Gch6QzYcxf0o6tGi2i3c-jgo

To claim this, I am signing this object:

@deevus
deevus / telegram.ps1
Last active December 17, 2017 01:51
$path = split-path $(resolve-path $(scoop which telegram))
push-location $path
./Telegram.exe
pop-location
@deevus
deevus / Update All Repos.ps1
Created December 21, 2011 17:17
Powershell script to pull and update all Mercurial repositories in the host directory
Cls
Write-Host "Searching for repositories to update..."
Write-Host
$dirs = Get-ChildItem | where {$_.PsIsContainer} | where { Get-ChildItem $_ -filter ".hg" }
foreach ($dir in $dirs)
{
Start-Job -Name HgUpdate$dir -ArgumentList @($dir.FullName) -ScriptBlock {
pushd $args[0]
hg pull --update
@deevus
deevus / gh-dl-release
Last active May 8, 2023 17:08 — forked from maxim/gh-dl-release
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#