Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@gcamp806
gcamp806 / auth.dart
Created April 1, 2020 12:31 — forked from nikhilmufc7/auth.dart
Firebase Flutter Platform Exception Codes and example
// Error Codes for SignUp
ERROR_OPERATION_NOT_ALLOWED` - Indicates that Anonymous accounts are not enabled.
ERROR_WEAK_PASSWORD - If the password is not strong enough.
ERROR_INVALID_EMAIL` - If the email address is malformed.
ERROR_EMAIL_ALREADY_IN_USE - If the email is already in use by a different account.
ERROR_INVALID_CREDENTIAL` - If the [email] address is malformed.
// sending password reset email
ERROR_INVALID_EMAIL` - If the [email] address is malformed.
@gcamp806
gcamp806 / Program.cs
Created June 26, 2019 03:04 — forked from marcel-valdez/Program.cs
Arris TM602A password of the day generator
/*
* Arris TM602A password of the day generator
*
* Author of Original JavaScript Version: Raul Pedro Fernandes Santos
* Author of this C# Code: Marcel Valdez Orozco
* Project homepage for JavaScript Version: http://www.borfast.com/projects/arrispwgen
*
* This software is distributed under the Simplified BSD License.
*
* Copyright 2012 Marcel Valdez Orozco. All rights reserved.
@gcamp806
gcamp806 / timestamp.md
Last active October 24, 2018 14:19
Script to add timestamp to every line of a log file

How to add a timestamp to every line of a log file

There are occasions where you would like to have a log file include a timestamp for each line. The following script will allow you to do just that.

timestamp.sh

#!/bin/bash
while read x; do
    echo -n `date +\[%Y-%m-%d\ %H:%M:%S.%3N]`;
    echo -n " ";
 echo $x;
@gcamp806
gcamp806 / Constants.swift
Last active May 16, 2018 17:35
Swift constants
struct Const {
struct Mod {
static let job = 6
static let jobInfo = 1
static let jobPhase = 2
static let jobEquip = 3
static let equipment = 5
static let forms = 7
@gcamp806
gcamp806 / initial-ubuntu-config.txt
Created May 9, 2018 14:20
Initial Ubuntu config
apt install vim
sudo update-alternatives --config editor (select vim.basic)
visudo - change %sudo line to this (adding NOPASSWD: in front of ALL)
%sudo ALL=(ALL:ALL) NOPASSWD:ALL
@gcamp806
gcamp806 / cheatsheet.md
Created December 18, 2017 22:10
Terminal cheatsheet for macOS

Terminal Cheatsheet for Mac (Basics)


Letters are shown capitalized for readability only. Capslock should be off.

SHORTCUTS

Key/Command Description
Ctrl + A Go to the beginning of the line you are currently typing on. This also works for most text input fields system wide. Netbeans being one exception
@gcamp806
gcamp806 / Default (OSX).sublime-keymap -- User
Created November 13, 2017 16:37 — forked from mnme/Default (OSX).sublime-keymap -- User
Sublime Text 2 and 3: fix for OSX home/end keys, with selection support and command (super) key
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} },
{ "keys": ["shift+end"], "command": "move_to", "args": {"to": "eol", "extend": true} },
{ "keys": ["shift+home"], "command": "move_to", "args": {"to": "bol", "extend": true } },
{ "keys": ["super+end"], "command": "move_to", "args": {"to": "eof"} },
{ "keys": ["super+home"], "command": "move_to", "args": {"to": "bof"} },
{ "keys": ["super+shift+end"], "command": "move_to", "args": {"to": "eof", "extend": true} },
{ "keys": ["super+shift+home"], "command": "move_to", "args": {"to": "bof", "extend": true } },
@gcamp806
gcamp806 / macOS-.bash_profile
Last active November 1, 2017 13:49
macOS-bash profile/rc scripts
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
@gcamp806
gcamp806 / .bash_gcamp
Last active May 9, 2018 14:21
My custom bashrc script
#!/bin/bash
# Greg's custom bash stuff
# Executed by ~/.bashrc, e.g. source ~/.bash_gcamp
###export EDITOR='sublime'
# prompt helper functions
function parse_git_dirty
{
if [ -d .git ] || git rev-parse --git-dir > /dev/null 2>&1; then
#[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "✘ " || echo "✔ "
@gcamp806
gcamp806 / homebrew_install_macOS.txt
Last active April 10, 2020 01:35
Homebrew install on macOS
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install libdvdcss
**PRELIMINARY**
// Install Xcode Tools: xcode-select --install
// Install Homebrew: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
**CASK**
//Install Cask brew install cask