Skip to content

Instantly share code, notes, and snippets.

Ian DesJardins iandesj

Block or report user

Report or block iandesj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
iandesj / parameters.js
Created Jul 16, 2019
Configuration Objects vs. Many Parameters
View parameters.js
// before - 5 args too many
function initializeNewUserWorflow(
email, password, location,
organization, referred) {
// initialize the new user
// after - using configuration object
const initializeUserConfiguration = {
email: 'email',
iandesj / methods.js
Created Jul 16, 2019
Simplified Methods
View methods.js
// before method simplification
function parseAndSanitizeAndGenerateDocument(data) {
const parsedData = [];
for (let index = 0; index < data.length; index++) {
const element = data[index];
if ( === 'bacon') {
age: element.age,
iandesj / booleans.js
Created Jul 16, 2019
Named Boolean Expressions
View booleans.js
// before named boolean expressions
// check if the user is active and if the user has
// dependents
if (user.status === 'active' &&
user.dependents.length > 1) {
// perform something important
// before
if (!user.authenticated) {
iandesj / naming.js
Created Jul 16, 2019
Variable & Function Naming
View naming.js
// before good naming
const user = getActiveUser();
const peopleData = fetchData();
function beginProc(data) {}
const d = new Date();
class CatRepository {
View mn
yum install epel-release -y && yum install gcc python2-devel python-pip upx -y
yum install git -y
git clone && cd akroma-masternode-management/source
pip install -r requirements.txt
pyinstaller --onefile --noconfirm --clean --log-level=WARN --strip --runtime-tmpdir /dev/shm
pyinstaller --onefile --noconfirm --clean --log-level=WARN --strip --runtime-tmpdir /dev/shm
./dist/akroma-mn-setup -h
yes | ./dist/akroma-mn-setup
iandesj /
Last active Jun 26, 2018
Script for membership and user tables for LOTS
#!/usr/bin/env python
# Author: Ian Des Jardins
# Date: 06/26/2018
import sys
from datetime import date
def find_line_and_values(lines, file_cursor):
line = ''
line_count = 1
iandesj / comfortable-swipe.conf
Created Jun 5, 2018
View comfortable-swipe.conf
# Comfortable Swipe converts touchpad swipe gestures to keyboard commands. You
# may edit this configuration file if you have different keyboard shortcuts
# that you would like to use. You can ignore a gesture by commenting out with
# a pound(#) symbol.
# Refer to for a list of
# keycodes you can use.
View cleanup.bat
cleanupcode.exe /p=LOTS-Solution /s="$env:AppData\JetBrains\Shared\vAny\GlobalSettingsStorage.DotSettings" "$env:USERPROFILE\Source\Repos\lots-solution\LOTS\LOTS.sln" --include=".\$("$(git diff --name-only origin/master...)
".split(" ") -like "*.cs" -replace "^LOTS", "**" -join ";")"
View 1-5 evening
diff --git a/LOTS/LOTS.Web/app/shared/search/common-search/common-search.component.html b/LOTS/LOTS.Web/app/shared/search/common-search/common-search.component.html
index 2b40150..3c74b2d 100644
--- a/LOTS/LOTS.Web/app/shared/search/common-search/common-search.component.html
+++ b/LOTS/LOTS.Web/app/shared/search/common-search/common-search.component.html
@@ -91,7 +91,7 @@
<div class="col-sm-12">
<div class="btn-group pull-right">
<button type="button" class="btn btn-default" (click)="resetForm()">Reset</button>
- <button #btnSubmit [disabled]="pristineInvalid" class="btn btn-primary" (click)="submitSearch(searchForm)">Submit</button>
+ <button #btnSubmit [disabled]="isSubmitDisabled()" class="btn btn-primary" (click)="submitSearch(searchForm)">Submit</button>
View somegist.ps1
$file_path = "C:\the_xml.xml"
$xml = [xml](Get-Content $file_path)
$xml.User.Role.value # retrieve value from <User><Role value="foobar"></User></Role>
$xml.User.Role.value = "lets update this" # change the contents of value
# lots of other cool stuff
$$file_path) # then save it, like a champ
You can’t perform that action at this time.