Skip to content

Instantly share code, notes, and snippets.

@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
#
@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 / telegram.ps1
Last active December 17, 2017 01:51
$path = split-path $(resolve-path $(scoop which telegram))
push-location $path
./Telegram.exe
pop-location

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 / 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
}
@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 / gist:3150080
Created July 20, 2012 10:35
Installing Sublime Package Control
import urllib2,os; pf='Package Control.sublime-package'; ipp=sublime.installed_packages_path(); os.makedirs(ipp) if not os.path.exists(ipp) else None; urllib2.install_opener(urllib2.build_opener(urllib2.ProxyHandler())); open(os.path.join(ipp,pf),'wb').write(urllib2.urlopen('http://sublime.wbond.net/'+pf.replace(' ','%20')).read()); print 'Please restart Sublime Text to finish installation'
info it worked if it ends with ok
verbose cli [ 'C:\\Program Files (x86)\\nodejs\\\\node.exe',
verbose cli 'C:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
verbose cli 'install',
verbose cli '-g',
verbose cli 'express' ]
info using npm@1.1.1
info using node@v0.6.11
verbose config file C:\Users\Simon\.npmrc
verbose config file C:\Program Files (x86)\nodejs\etc\npmrc
@deevus
deevus / gist:1346709
Created November 8, 2011 00:57
Clone me using hg-git
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
@deevus
deevus / scoop-plist.ps1
Created April 5, 2015 04:24
Posh version of scoop-list
# Usage: scoop plist <query>
# Summary: A posh version of scoop list
# Help: Lists the apps installed in scoop
param($query)
$(scoop shellinit)
. "$env:SCOOP_HOME/lib/core.ps1"
. "$env:SCOOP_HOME/lib/manifest.ps1"
. "$env:SCOOP_HOME/lib/versions.ps1"