Skip to content

Instantly share code, notes, and snippets.

View maxmckenzie's full-sized avatar

Max McKenzie maxmckenzie

View GitHub Profile
@furkanedu
furkanedu / redux.js
Last active September 4, 2019 11:37
Example redux file with constants, reducer and actions
const namespace = 'shoud_be_unique_for_each_reducer'
const MERGE_REDUX_STATE_WITH = `${namespace}---MERGE_REDUX_STATE_WITH`
const RESET_REDUX_STATE = `${namespace}---RESET_REDUX_STATE`
const initialState = {}
export default function reducer(state = initialState, action) {
switch(action.type) {
case MERGE_REDUX_STATE_WITH:
sudo apt install -y autoconf automake build-essential python-dev libtool libssl-dev pkg-config
cd /tmp
git clone https://github.com/facebook/watchman.git -b v4.9.0 --depth 1
cd watchman/
./autogen.sh
./configure --enable-lenient
make
sudo make install

How to calculate your hourly rate as a freelancer?

Many people struggle with this question. Some just try to make as much as a full-time employee makes (and ignore that they won't be able to bill as many days). Others follow tips on startup related websites that suggest to ask for 20% to 50% more than an salary would yield (and ignore the additional risk and expenses they have).

Below you will find some numbers to help you calculate how high your hourly or daily rate should be.

Your yearly income should be higher than an average salary

  • You take more risk than full time employees, phases without income are likely
@jonschoning
jonschoning / pc.laptop
Last active October 10, 2022 11:33
/usr/share/X11/xkb/symbols/pc (swap CTRL+ALT+CAPS; ALT->CTRL, CAPS->ALT) https://github.com/jonschoning/xkb_symbols
default partial alphanumeric_keys modifier_keys
xkb_symbols "pc105" {
key <ESC> { [ Escape ] };
// The extra key on many European keyboards:
key <LSGT> { [ less, greater, bar, brokenbar ] };
// The following keys are common to all layouts.
key <BKSL> { [ backslash, bar ] };
@pwenzel
pwenzel / lamp-stack-osx-virtualhostx.md
Last active September 23, 2024 11:14
LAMP stack on OSX with Homebrew, built-in Apache, multiple PHP versions, VirtualhostX optional

This guide shows how to set up a PHP and MySQL development environment using OSX's built-in Apache, using Homebrew to install necessary components. With this strategy, you can use different versions of PHP for certain virtual hosts.

VirtualHostX is a convenient way to manage development sites, but not required.

Install PHP and MySQL with Homebrew

brew update
brew install php56
brew install php56-mcrypt
brew install mysql
@subfuzion
subfuzion / mysql-autostart-osx.md
Created March 18, 2014 22:39
mysql auto start on OS X

Install with Homebrew

brew install mysql

Set up launchctl to auto start mysql

$ ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents

/usr/local/opt/mysql/ is a symlink to /usr/local/Cellar/mysql/x.y.z (e.g., 5.6.16)

@kevin-smets
kevin-smets / iterm2-solarized.md
Last active November 14, 2024 15:40
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@chrisbloom7
chrisbloom7 / example_table.html
Created June 11, 2012 18:52
A cucumber/capybara step to test the order of data in a table, either with or without headers
<html>
<body>
<section class="left">
<article id="customers">
<h2>New Customers</h2>
<table class="data">
<thead>
<tr>
<th>ID</th>
<th>First Name</th>
@pksunkara
pksunkara / config
Last active November 15, 2024 16:02
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = [email protected]
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
@evadne
evadne / .siFancyScrollbar.less
Created February 20, 2010 04:01
Fancy Scrollbar (in WebKit). Written using LESS, needs gem to compile down to regular .CSS.
.siFancyScrollbar {
::-webkit-scrollbar,
::-webkit-scrollbar-button:start:increment,
::-webkit-scrollbar-button:start:decrement,
::-webkit-scrollbar-button:end:increment,
::-webkit-scrollbar-button:end:decrement {
width: 9px;
height: 9px;