Skip to content

Instantly share code, notes, and snippets.

View dragon788's full-sized avatar

dragon788 dragon788

View GitHub Profile
@dragon788
dragon788 / gist:28939806f97310cce927
Created March 16, 2015 23:55
Synergy Windows Lock to replace Win+L
Create a shortcut with this as the target, and then potentially assign a keyboard shortcut via autohotkey or the like.
C:\Windows\System32\rundll32.exe user32.dll,LockWorkStation
@dragon788
dragon788 / gist:fbfe53ace437d9ff9c4b
Last active August 29, 2015 14:17
Getting disk space from Windows CMD prompt
fsutil volume diskfree c:
wmic logicaldisk get size,freespace,caption
#Powershell
Get-WmiObject -Class Win32_LogicalDisk | Where { $_.DriveType -eq 3 }
@dragon788
dragon788 / 0_reuse_code.js
Last active August 29, 2015 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@dragon788
dragon788 / gist:a51781f64ddab3372e10
Last active August 29, 2015 14:17
Installing VMware Workstation from the bundle on Linux
sudo sh ./VMware-Workstation-Full-*.*.bundle --console --required --eulas-agreed
# Adding the serial number to the above command is optional if you are evaluating it
--set-setting vmware-workstation serialNumber #####-#####-#####-#####-#####
@dragon788
dragon788 / gist:772728af914faeb8daa0
Created March 27, 2015 03:55
Ubiquity installer package workaround
http://permalink.gmane.org/gmane.linux.ubuntu.devel.utah/24
I did some research on installing proprietary drivers and came across
ubiquity/use_nonfree and ubiquity/nonfree_package. It's a bit of a hack,
because it wasn't intended for this kind of functionality, but it looks like
you could set ubiquity/use_nonfree to true, and it will install the packages
defined in ubiquity/nonfree_package. This by default is a metapackage called
ubuntu-restricted-addons, but you could add the packages you need here. It
would look cleaner than using success_command.
#!/bin/bash
# Usage:
#
# sudo ./restore-file-from-package.sh <filepath>
#
# Restore a file from the package that provides it.
#
# Source: http://askubuntu.com/a/67028/30482
# using --force-confask instead of confmiss to
@dragon788
dragon788 / 0_reuse_code.js
Last active August 29, 2015 14:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@dragon788
dragon788 / _readme.md
Last active August 29, 2015 14:19 — forked from shime/_readme.md

Having trouble installing the latest stable version of tmux?

I know, official package for your OS/distro is outdated and you just want the newest version of tmux.

Well, this script should save you some time with that.

Prerequisities

  • gcc
// dimensions Cherry MX connector
var c_corr = 0.4 // tolerance
var c_horiz = 1.1 // horizontal bar width
var c_vert = 1.0 // vertical bar width
var c_dia = 4 // cross width
var c_depth = 7 // connector depth
var c_space = 7 // height of hollow inside
var c_inset = 0.75 // distance connector start to keycap base
// stuff
#!/bin/sh
# This script lists user defined search engines in Chromium.
# It replaces {inputEncoding}, which appears in some search engine definitions, with
# UTF-8, {google:baseURL} with the Google URL, and omits other such tokens.
# Location of Chromium's 'Web Data' SQLite3 file
CHROMIUM_WEB_DATA="$HOME/.config/chromium/Default/Web Data"
# Location to create temporary copy of 'Web Data', since the database is locked while