Suppose you have weird taste and you absolutely want:
- your visual selection to always have a green background and black foreground,
- your active statusline to always have a white background and red foreground,
- your very own deep blue background.
#!/usr/bin/env python | |
# requires optipng library | |
import os,optparse | |
parser = optparse.OptionParser() | |
parser.add_option('--file', '-f', default=False, help="The file to optimize. Omit to optimize all pngs in the current directory.") | |
parser.add_option('--optimization', '-o', default=7, help="The optimatization level to run. Defaults to 7.") | |
options,args = parser.parse_args() |
<?php | |
/** | |
* Super-simple AWS CloudFront Invalidation Script | |
* | |
* Steps: | |
* 1. Set your AWS access_key | |
* 2. Set your AWS secret_key | |
* 3. Set your CloudFront Distribution ID | |
* 4. Define the batch of paths to invalidate | |
* 5. Run it on the command-line with: php cf-invalidate.php |
#!/bin/bash | |
# Paste at Pastebin.com using command line (browsers are slow, right?) | |
# coder : Anil Dewani | |
# date : Novemeber 7, 2010 | |
#help function | |
howto() | |
{ | |
echo "\ | |
Pastebin.com Bash Script \ |
#!/bin/sh | |
set -o errexit | |
PNGS=`find . -iname "*.png"` | |
JPGS=`find . -iname "*.jpg"` | |
TMP1="_TMP1.PNG" | |
TMP2="_TMP2.PNG" | |
echo "Optimizing PNG" | |
for PNG in ${PNGS} |
/* | |
Auto-version CSS & JS files, allowing for cache busting when these files are changed. | |
Place in functions.php or wherever you are enqueueing your scripts & styles | |
Avoids using query strings which prevent proxy caching | |
Adjust paths based on your theme setup. These paths work with Bones theme | |
*/ |
" XDG Environment For VIM | |
" ======================= | |
" | |
" References | |
" ---------- | |
" | |
" - http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables | |
" - http://tlvince.com/vim-respect-xdg | |
" - https://gist.github.com/kaleb/3885679 (the original version) | |
" |
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] | |
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,5d,e0,37,e0,00,00,00,00 | |
Suppose you have weird taste and you absolutely want:
Make sure you have WSL with the Windows 10 Fall Creators Update installed. Ranger uses rifle
as a file handler
and you need its config file, rifle.conf
. If you dont have it (should be in ~/.config/ranger/rifle.conf
), run
the command ranger --copy-config=rifle
, then edit the resulting file.
To run Windows applications from Ranger, we will use cmd.exe /C start "" <file>
, which works after the Fall
Creators Update. The problem is that Ranger will feed in file paths using Unix pathing, but start
expects Windows
pathing. We will solve this by using sed
to translate the path.
Add below code to your rifle.conf
and you will be able to run Windows applications for the chosen file extensions.
<# | |
.SYNOPSIS | |
Script to Initialize my custom powershell setup. | |
.DESCRIPTION | |
Script uses scoop | |
.NOTES | |
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted. | |
Author: Mike Pruett | |
Date: October 18th, 2018 |