Skip to content

Instantly share code, notes, and snippets.

@wad3g
wad3g / index.html
Created July 3, 2018 08:21
Parallelogram with transform: skew
<div class="container">
<img src="https://picsum.photos/500/300?image=0">
</div>
@wad3g
wad3g / print.html
Created May 10, 2018 18:08
Target specific div / element to print
<script>
function printDiv(divName){
var printContents = document.getElementById(divName).innerHTML;
document.body.innerHTML = printContents;
window.print();
document.body.innerHTML = originalContents;
}
</script>
<h1>This Won't Print</h1>

Keybase proof

I hereby claim:

  • I am wad3g on github.
  • I am wad3g (https://keybase.io/wad3g) on keybase.
  • I have a public key ASDPIpNGtHwo_oWit7546U7-n3VT8XDwcTnedj8z70vZiQo

To claim this, I am signing this object:

@wad3g
wad3g / .bash_profile
Created September 8, 2016 01:58
My Bash Profile
#!/bin/bash
# Set 256 color profile where possible
if [[ $COLORTERM == gnome-* && $TERM == xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM=gnome-256color
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color
fi
### Set Architecture Flags
@wad3g
wad3g / incognito-chrome-canary.applescript
Created September 8, 2016 01:56
Opens a new Incognito Window in Chrome Canary
on alfred_script(q)
tell application "Google Chrome Canary"
activate
tell application "System Events"
keystroke "n" using {command down, shift down}
end tell
end tell
@wad3g
wad3g / firechrome.applescript
Created September 8, 2016 01:54
Open Chrome's current tab in Firefox or vice versa
tell application "System Events"
set myFrontMost to name of first item of (processes whose frontmost is true)
end tell
property theURL : ""
if myFrontMost is "Google Chrome" then
tell application "Google Chrome"
set theURL to URL of active tab of window 1
end tell
@wad3g
wad3g / Default (OSX).sublime-keymap
Created September 8, 2016 01:52
Sublime Text User Key Bindings
[
{ "keys": ["ctrl+tab"], "command": "next_view" },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
{ "keys": ["super+n"], "command": "new_window" },
{ "keys": ["super+t"], "command": "new_file" },
{ "keys": ["super+shift+r"], "command": "reindent"},
{ "keys": ["super+v"], "command": "paste_and_indent" },
{ "keys": ["super+shift+v"], "command": "paste" }
]
@wad3g
wad3g / browser-hacks.css
Created September 8, 2016 01:48
Browser hacks using css selectors and queries
/***** Selector though hack ******/
/* Only for IE6 and below */
* html div { color: gray }
/* Only for IE7 */
*:first-child+html div { color: gray }