Skip to content

Instantly share code, notes, and snippets.

View NerdGr8's full-sized avatar

Nerudo Mregi NerdGr8

View GitHub Profile
@NerdGr8
NerdGr8 / Add nuggets [CLI]
Last active July 11, 2023 10:28
Generates Alter Columns statements to change any uncompliant columns to postgress naming conventions.
#Run teh following in the terminal:
Install-Package Npgsql.EntityFrameworkCore.PostgreSQL
@NerdGr8
NerdGr8 / countries.txt
Last active August 20, 2020 12:09
Country code enum
import System.ComponentModel;
/// <summary>
/// States and Territories of the US
/// </summary>
public enum Countries {
[,
Description,
@NerdGr8
NerdGr8 / mysql2sqlite.sh
Created March 6, 2019 06:47 — forked from esperlu/mysql2sqlite.sh
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
@NerdGr8
NerdGr8 / home-brew-mysql-essential-commands
Created November 15, 2018 11:15 — forked from jasperf/home-brew-mysql-essential-commands
Homebrew Create a MySQL database and user to be used for a WordPress site from the command line with mysql and restart server when you have a socket error or other error #wordpress #mysql #homebrew
//homebrew mysql start
/usr/local/Cellar/mysql/5.6.19/bin/mysql.server restart
//or
mysql.server start
//check for access privileges
mysqlaccess localhost user database
@NerdGr8
NerdGr8 / GetWeeksInMonth.js
Created July 11, 2018 19:52 — forked from markthiessen/getWeeksInMonth.js
JavaScript - get weeks in a month as array of start and end days
//note: month is 0 based, just like Dates in js
function getWeeksInMonth(month, year){
var weeks=[],
firstDate=new Date(year, month, 1),
lastDate=new Date(year, month+1, 0),
numDays= lastDate.getDate();
var start=1;
var end=7-firstDate.getDay();
while(start<=numDays){
This file has been truncated, but you can view the full file.
MDAddinsHash: ed25d008672663eeb9db55f1ccecb3c24d2fd3b2
[2016-09-30 10:54:41.8] INFO: Starting full reload...
[2016-09-30 10:54:45.5] INFO: Beginning the boostrap process for `/Applications/Xcode.app' / `/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk'
[2016-09-30 10:54:45.5] WARN: CreateDevice failed. Resetting service connection. Exception: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSUnderlyingError=0x7fe3f6648e40 {Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Error returned in reply to notification request: Connection invalid}}, NSLocalizedFailureReason=Failed to subscribe to notifications from CoreSimulatorService., NSLocalizedDescription=Failed to initialize simulator device set.}
[2016-09-30 10:54:45.5] INFO: ResetServiceConnection: Resetting csproxy.
[2016-09-30 10:54:46.2] PERF: - Waited 0ms for device to finish creating
[2016-09-30
=== Xamarin Studio Community ===
Version 6.1 (build 5441)
Installation UUID: 8b953581-8712-4afa-9d53-0668ac145a36
Runtime:
Mono 4.6.0 (mono-4.6.0-branch/746756c) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 406000245
@NerdGr8
NerdGr8 / get_barcode_from_image.js
Created May 24, 2012 12:38 — forked from tbtlr/get_barcode_from_image.js
Barcode recognition with JavaScript - Demo: http://bit.ly/djvUoy
/*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*/
(function(){
var UPC_SET = {
"3211": '0',
"2221": '1',
"2122": '2',