Skip to content

Instantly share code, notes, and snippets.

View nickdotht's full-sized avatar
💀
Memento Mori

Nick nickdotht

💀
Memento Mori
View GitHub Profile
@nickdotht
nickdotht / Package Control.sublime-settings
Last active August 3, 2016 19:28
My sublime text 3 configuration and snippets
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"Emmet",
"JsFormat",
"JSHint",
#!/bin/sh
config=~/.zshrc
echo "" >> ${config}
echo "# Shortcuts provided by Nick Rameau (@r4meau | 42)" >> ${config}
echo "# Remove those two lines below if you're not using a 42 computer" >> ${config}
echo "alias gg=\"gcc -Wall -Wextra -Werror\"" >> ${config}
echo "alias nn=\"norminette -R CheckForbiddenSourceHeader\"" >> ${config}
echo "" >> ${config}
// ==UserScript==
// @name slitherio plugin
// @namespace hc.priv.no
// @description Plugin for slither.io
// @include http://slither.io/*
// @include https://slither.io/*
// @updateURL https://github.com/Montaron/Slitherio-Plugin/raw/master/slitherio-plugin.meta.js
// @downloadURL https://github.com/Montaron/Slitherio-Plugin/raw/master/slitherio-plugin.user.js
// @version 1.13
// @grant none
@nickdotht
nickdotht / nick-vim.vim
Last active September 24, 2016 05:15
Got most of this from http://vim-bootstrap.com but the custom configs are done at the bottom
"" Vim-PLug core
"*****************************************************************************
if has('vim_starting')
set nocompatible " Be iMproved
endif
let vimplug_exists=expand('~/.vim/autoload/plug.vim')
let g:vim_bootstrap_langs = "javascript,ruby,python,c"
@nickdotht
nickdotht / arr_find.c
Last active March 18, 2017 12:14
arr_find.c
#include <stdio.h>
#include <stdlib.h>
int main(int ac, char **av)
{
int t;
int n;
int *arr;
int i;
int j;
When building React Native apps on Linux, you might get this error at some point:
The user limit on the total number of inotify watches was reached; increase the fs.inotify.max_user_watches sysctl
Here's how to fix it:
You will need administration privileges at some point!
1. Check for the current value of max_user_watches
@nickdotht
nickdotht / README.md
Created September 26, 2017 04:50 — forked from csswizardry/README.md
Vim without NERD tree or CtrlP

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vs **/*<partial file name><Tab>
@nickdotht
nickdotht / ops-report.sql
Created March 6, 2018 18:12
This is the SQL query that I use to generate operations reports for Xero
SELECT
kiosk.name AS ContactName,
'' AS 'EmailAddress',
'' AS 'POAddressLine1',
'' AS 'POAddressLine2',
'' AS 'POAddressLine3',
'' AS 'POAddressLine4',
'' AS 'POCity',
'Saintard' AS 'PORegion',
'' AS 'POPostalCode',
@nickdotht
nickdotht / Get all kiosk sales between date range.sql
Created March 6, 2018 19:38
I use this to pull sales data so we can take care of duplicated sales
SELECT
kiosk.name AS 'Kiosk',
receipt.id as 'Receipt ID',
DATE_FORMAT(receipt.created_date, '%m/%d/%Y') AS Date,
customer_account.id AS 'Customer ID',
customer_account.contact_name AS 'Customer Name',
sales_channel.name AS 'Sales Channel',
receipt_line_item.sku AS 'SKU',
receipt_line_item.quantity 'Qty',
receipt.total_gallons 'Gallons',
@nickdotht
nickdotht / create_country.sql
Last active October 30, 2018 16:45
SEMA - Getting started. Those are the SQL scripts to run on the database to get started quickly with some sample data. You must first run the ones that are in the `database` folder of the project.
INSERT INTO `country` (`id`, `name`) VALUES (1, 'Haiti');