Skip to content

Instantly share code, notes, and snippets.

View thefonso's full-sized avatar

thefonso thefonso

View GitHub Profile
@thefonso
thefonso / bash_profile
Last active June 15, 2018 10:14 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
alias mysql=/Applications/MAMP/Library/bin/mysql
@thefonso
thefonso / slack_app_theme_instructions.md
Last active March 22, 2018 03:35
Slack app (mac) custom theme technique

Theming Slack for OSX

(revised)

So, you love Slack, but you hate applications with large white backgrounds? Why not use Dark Mode!

Unfortunately, Slack does not have a Dark Mode, although it's on their list of possibilities.

But, don't fret - there is a solution! Because the slack native desktop apps are just wrappers around a web app, we can inject our own CSS to customize the application to our liking.

@thefonso
thefonso / slack-dark-theme.css
Created March 22, 2018 02:32
Dark theme for Slack mac app
#msgs_scroller_div::-webkit-scrollbar-track, #client_body::before, .client_container,
#search_terms, #client_body, #footer, ts-message, .channel_header, ts-jumper ts-jumper-container,
ts-jumper input[type="text"],
.supports_custom_scrollbar:not(.slim_scrollbar) #col_channels:hover #channels_scroller::-webkit-scrollbar-track,
.feature_sli_file_search #search_results.all, .feature_sli_file_search #search_results.messages,
.feature_sli_file_search #search_results.files{
background: #333 !important;
}
.feature_sli_file_search #search_results.all .search_message_result, .feature_sli_file_search #search_results.messages .search_message_result,
@thefonso
thefonso / sets.json
Last active February 15, 2018 00:51
Bootstrap 4 Grid Guides. Exported by the GuideGuide plugin.
[{"name":"BS4 - XL - 1140 (canvas:1470)","notation":"$v = | 65px | 15px | 15px |\n$vC = | 65px |\n150px | 15px | 15px | $v*11 | $vC | 15px | 15px | 150px ( vlp, | ~ )"},{"name":"BS4 - LG - 940 (canvas:1270)","notation":"150px | 17px | 15px | 48px | 15px | 15px | 48px | 15px | 15px | 48px | 15px | 15px | 48px | 15px | 15px | 48px | 15px | 15px | 48px | 15px | 15px | 48px | 15px | 15px | 48px | 15px | 15px | 48px | 15px | 15px | 48px | 15px | 15px | 48px | 15px | 15px | 48px | 15px | 17px | ( vlp )"},{"name":"BS4 - MD - 720 (canvas:1050)","notation":"150px | 15px | 15px | 30px | 15px | 15px | 30px | 15px | 15px | 30px | 15px | 15px | 30px | 15px | 15px | 30px | 15px | 15px | 30px | 15px | 15px | 30px | 15px | 15px | 30px | 15px | 15px | 30px | 15px | 15px | 30px | 15px | 15px | 30px | 15px | 15px | 30px | 15px | 15px | ( vlp )"}]
@thefonso
thefonso / array_reverse.rb
Created September 4, 2017 06:43 — forked from abitdodgy/array_reverse.rb
Array Algorithms
#
# 2 - REVERSAL
#
# The quickest way to reverse an array is to swap elements at either end, and repeat
# while moving up from the left and down from the right.
#
# [ a b c d e f ]
# [ f a ] - Step 1 we switched A[0] with A[-1]
# [ e b ] - Step 2 we switched A[1] with A[-2]
# [ d c ] - Step 3 we switched A[2] with A[-3]
@thefonso
thefonso / Install_configure_sendmail_on_Ubuntu_1404.md
Last active June 10, 2017 08:12
Install and configure Sendmail on Ubuntu 14.04

Install and configure Sendmail on Ubuntu

This should help you get Sendmail installed with basic configuration on Ubuntu.

  1. If sendmail isn't installed, install it: sudo apt-get install sendmail
  2. Configure /etc/hosts file: nano /etc/hosts
  3. Make sure the line looks like this: 127.0.0.1 localhost yourhostname
  4. Run Sendmail's config and answer 'Y' to everything: sudo sendmailconfig
  5. Restart apache sudo service apache2 restart
  6. $ echo "Subject: sendmail test" | sendmail -v SOMETHING@SOMEMAIL.COM
@thefonso
thefonso / disable.sh
Last active February 11, 2026 07:26
turn off mac SIP system security Kill Airplay
#!/bin/bash
# IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after.
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# Agents to disable
TODISABLE=('com.apple.security.keychainsyncingoveridsproxy' 'com.apple.personad' 'com.apple.passd' 'com.apple.screensharing.MessagesAgent' 'com.apple.CommCenter-osx' 'com.apple.Maps.mapspushd' 'com.apple.Maps.pushdaemon' 'com.apple.photoanalysisd' 'com.apple.telephonyutilities.callservicesd' 'com.apple.AirPlayUIAgent' 'com.apple.AirPortBaseStationAgent' 'com.apple.CalendarAgent' 'com.apple.DictationIM' 'com.apple.iCloudUserNotifications' 'com.apple.familycircled' 'com.apple.familycontrols.useragent' 'com.apple.familynotificationd' 'com.apple.gamed' 'com.apple.icloud.findmydeviced.findmydevi
@thefonso
thefonso / gist:a119fe64c5d5f4ee986d44eb51cd39df
Created October 9, 2016 18:54 — forked from tonymtz/gist:d75101d9bdf764c890ef
Uninstall nodejs from OSX Yosemite
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
@thefonso
thefonso / rbenv-howto.md
Created September 28, 2016 04:41 — forked from MicahElliott/rbenv-howto.md
Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

Setting up and installing rbenv, ruby-build, rubies, rbenv-gemset, and bundler

This guide enables you to install (ruby-build) and use (rbenv) multiple versions of ruby, isolate project gems (gemsets and/or bundler), and automatically use appropriate combinations of rubies and gems.

TL;DR Demo

# Ensure system is in ship-shape.

aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev

@thefonso
thefonso / seeyouspacecowboy.sh
Created September 3, 2016 00:14
A shell script to display SEE YOU SPACE COWBOY whenever you logout of your terminal!
#!/usr/bin/env bash
# SEE YOU SPACE COWBOY by DANIEL REHN (danielrehn.com)
# Displays a timeless message in your terminal with cosmic color effects
# Usage: add "sh ~/seeyouspacecowboy.sh; sleep 2" to .bash_logout (or similar) in your home directory
# (adjust the sleep variable to display the message for more seconds)
# Cosmic color sequence