Skip to content

Instantly share code, notes, and snippets.

@thatnerdjosh
thatnerdjosh / gist:a61777d550dd25dc95b621238fc382e3
Last active December 10, 2020 07:56
proxy_unresolvable.pac
function FindProxyForURL(url, host) {
if (isResolvable(host))
return "DIRECT";
else
return "SOCKS5 localhost:8080";
}
@thatnerdjosh
thatnerdjosh / hairy_image_tar.sh
Created November 7, 2019 07:21
Find images in a given directory and tar!
find <RELATIVE_PATH> -name '*' -exec file {} \; | grep -o -P '^.+: \w+ image' | sed 's/\:.*//' | sed 's| |\\ |g' > image_list
cat image_list | xargs tar -czf images.tar.gz --files-from -
### Keybase proof
I hereby claim:
* I am nerdsvilleceo on github.
* I am omnidapps (https://keybase.io/omnidapps) on keybase.
* I have a public key ASCH6fvzx3VWO0j_ofooo9Qs3A3QEKt5JgEsJ_HcBTGf5Ao
To claim this, I am signing this object:
@thatnerdjosh
thatnerdjosh / flatten.go
Created August 13, 2019 18:45
FlattenSlice
package main
import(
"reflect"
)
// IsArrayType accepts an interface and returns whether it is an array
// This function will return false if it is not an array type
func IsArrayType(s interface{}) bool {
t := reflect.TypeOf(s)

Keybase proof

I hereby claim:

  • I am NerdsvilleCEO on github.
  • I am nerdsville (https://keybase.io/nerdsville) on keybase.
  • I have a public key whose fingerprint is DC84 EF4F 2510 EA35 212D 11D3 1BFF 9551 1CDA 1DCC

To claim this, I am signing this object:

@thatnerdjosh
thatnerdjosh / ubuntu-gl502vs.md
Created February 10, 2017 09:07 — forked from GMMan/ubuntu-gl502vs.md
Problems and Solutions for Ubuntu 16.04 LTS on ASUS ROG GL502VS Laptop

Problems and Solutions for Ubuntu 16.04 LTS on ASUS ROG GL502VS Laptop

NVIDIA Graphics

Nouveau does not appear to support Pascal cards right now, so you should use the proprietary NVIDIA driver, available from the Additional Drivers applet.

Panel Dithering

@thatnerdjosh
thatnerdjosh / ubuntu-gl502vs.md
Created February 10, 2017 09:07 — forked from GMMan/ubuntu-gl502vs.md
Problems and Solutions for Ubuntu 16.04 LTS on ASUS ROG GL502VS Laptop

Problems and Solutions for Ubuntu 16.04 LTS on ASUS ROG GL502VS Laptop

NVIDIA Graphics

Nouveau does not appear to support Pascal cards right now, so you should use the proprietary NVIDIA driver, available from the Additional Drivers applet.

Panel Dithering

@thatnerdjosh
thatnerdjosh / iterm2-solarized.md
Created December 15, 2016 23:46 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font (OS X / macOS)

Solarized

@thatnerdjosh
thatnerdjosh / mysql_secure.sh
Created May 14, 2016 23:08 — forked from Mins/mysql_secure.sh
Automating mysql_secure_installation
#!/bin/bash
aptitude -y install expect
// Not required in actual script
MYSQL_ROOT_PASSWORD=abcd1234
SECURE_MYSQL=$(expect -c "
set timeout 10
---
- hosts: local
tasks:
- name: Go.cd Data Container
docker:
name: gocd-data
image: gocd/gocd-server
state: present
volumes:
- /usr/log/go-server