Skip to content

Instantly share code, notes, and snippets.

View nickdotht's full-sized avatar
💀
Memento Mori

Nick Rameau 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",
" Lets you press F6 to add the standard 42 header to your file
nnoremap <F6> :Stdheader<CR>
" Sets UTF-8 encoding
set enc=utf-8
set fenc=utf-8
set termencoding=utf-8
" Disables vi compatibility (emulation of old bugs)
set nocompatible
#!/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}
@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"
// ==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 / 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
When building an adnroid app, you might stumble upon this error:
`Failed to finalize session : INSTALL_FAILED_UPDATE_INCOMPATIBLE...`. Here's how to fix it:
That's because the app you're trying to test was already installed on the device and the signatures are different now, so it's complaining. The full error will look like something like this:
`Failed to finalize session : INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.example signatures do not match the previously installed version; ignoring!`
You can see that the package ID is `com.example`, well, simply run this command:
@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',