Skip to content

Instantly share code, notes, and snippets.

View weblogix's full-sized avatar

Randy weblogix

View GitHub Profile
@weblogix
weblogix / .bash_profile
Last active March 8, 2017 06:59
.bash_profile for git-aware-prompt
# https://github.com/jimeh/git-aware-prompt
export GITAWAREPROMPT=~/.bash/git-aware-prompt
source "${GITAWAREPROMPT}/main.sh"
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
export PS1="\[\033[32m\]➤ \[\033[00m\]\W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] $ "
@weblogix
weblogix / mouse acceleration
Last active April 25, 2017 09:48
Apple OSX tweaks
# Tested on OSX 10.12
# Disable mouse pointer acceleration
defaults write .GlobalPreferences com.apple.mouse.scaling -1
# Disable mouse wheel acceleration
defaults write .GlobalPreferences com.apple.scrollwheel.scaling -1
@weblogix
weblogix / Create application shortcut
Last active April 27, 2017 09:20
Ubuntu (17.04) Installation tips
$ nano /usr/share/applications/<app>.desktop
#/usr/share/applications/<app>.desktop
[Desktop Entry]
Name=<App Name>
Comment=
Exec=/opt/<App>
Icon=/opt/<App>/app-icon.png
Terminal=false
#https://askubuntu.com/questions/909691/how-to-install-docker-on-ubuntu-17-04
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo apt-add-repository 'deb https://apt.dockerproject.org/repo ubuntu-zesty testing'
apt-get update
apt-cache policy docker-engine
@weblogix
weblogix / .bash_profile
Last active June 14, 2017 11:48
.bash_profile for my local development machine
# Defaults
export VISUAL=nano
# Aliases
alias c='clear'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'
@weblogix
weblogix / brew-cheatsheet
Last active August 29, 2017 02:45
brew cheatsheet #cheatsheet
# Install brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
# Uninstall all packages
brew remove --force --ignore-dependencies $(brew list)
@weblogix
weblogix / syncFolderDate.sh
Last active August 29, 2017 02:46
[File date sync] Sync's the file dates between 2 folders with the same files #sync #script
#!/bin/bash
SOURCE_DIR=$1
DESTINATION_DIR=$2
find "$SOURCE_DIR" -print | while read filename; do
FILE_NAME="$(basename "$filename")"
SOURCE_PATH="$SOURCE_DIR/$FILE_NAME"
DESTINATION_PATH="$DESTINATION_DIR/$FILE_NAME"
@weblogix
weblogix / webfont.md
Created September 6, 2017 12:18
[Web font] Snippet for using Web fonts #webfonts
@font-face {
  font-family: 'HelveticaNeueLT';
  src: url("fonts/HelveticaNeueLTPro-Bd.eot");  /* IE8 */
  src: url("fonts/HelveticaNeueLTPro-Bd.eot?#iefix") format('embedded-opentype'),  /* IE9 */
    url("fonts/HelveticaNeueLTPro-Bd.woff2") format("woff2"), /* Chrome, Firefox */
    url("fonts/HelveticaNeueLTPro-Bd.woff") format("woff"),  /* Chrome, Firefox, Safari, IE9 */
    url("fonts/HelveticaNeueLTPro-Bd.ttf") format("truetype"), /* Chrome, Firefox, IE9 */
    url("fonts/HelveticaNeueLTPro-Bd.svg#HelveticaNeueLTPro-Bd") format("svg"); /* Safari */
  font-weight: 700;
@weblogix
weblogix / .htaccess - SSL redirect
Last active September 10, 2017 04:48
[Apache htaccess examples] htaccess rules #htaccess #apache
# Source: https://really-simple-ssl.com/knowledge-base/manually-insert-htaccess-redirect-http-to-https/
If you see #SERVER-HTTPS-ON# (on), add
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</IfModule>
If you see #SERVER-HTTPS-ON# (1), add
@weblogix
weblogix / readme.md
Last active September 10, 2017 04:48
OpenSSL - How to generate a self-signed certificate in non interactive mode #openssl