Skip to content

Instantly share code, notes, and snippets.

View wintondeshong's full-sized avatar

Winton DeShong wintondeshong

View GitHub Profile
@wintondeshong
wintondeshong / use-identity-v1-original.ts
Last active December 1, 2020 11:33
React Hook Refactoring
// ----------------------------------------------------
// This is the original react hook before refactoring
// ----------------------------------------------------
import IdentityRecord from "models/view-models/identity-record";
import UserLoginRecord from "models/view-models/user-login-record";
import { useCallback } from "react";
import RoleService from "utilities/services/role-service";
import UserRoleService from "utilities/services/users/user-roles/user-role-service";
import UserService from "utilities/services/user-service";
@wintondeshong
wintondeshong / and-cli-github.js
Last active November 3, 2020 12:38
Calculate maintainer reviews for Hacktoberfest using AndcultureCode/AndcultureCode.Cli
// https://github.com/AndcultureCode/AndcultureCode.Cli/blob/main/and-cli-github.js
await github.getToken(); // make all requests authenticated
const repos = await github.repositoriesByAndculture();
echo.headerSuccess("Calculating review counts...");
const reviewCounts = {};
await js.asyncForEach(repos, async (repo) => {
echo.message(` - Processing ${repo.full_name}`);
@wintondeshong
wintondeshong / Gemfile-after.rb
Last active August 29, 2015 14:11
Ruby Gemfile After
# @see the before here -> https://gist.github.com/wintondeshong/0f69c292d6679bca1a9e
# 1. Specify ruby version
# 2. Maintain order of groups
# - default
# - production
# - staging
# - beta
# - assets
# - test
@wintondeshong
wintondeshong / Gemfile-before.rb
Last active August 29, 2015 14:11
Ruby Gemfile Before
# @see the after here -> https://gist.github.com/wintondeshong/b1674f2ea97df5f79858
source 'https://rubygems.org'
gem 'rake', '10.0.0'
gem 'rails', '3.2.16'
#gem 'httparty', github: 'dkastner/httparty', branch: 'handle_invalid_location_uris'
gem 'dkastner-httparty'
gem 'mysql2'
@wintondeshong
wintondeshong / Gemfile
Created October 31, 2013 19:11
Given an array of Jenkins CI job names, the script will retrieve the details for each build and output the results into a JSON file. Uses the Jenkins API Client Ruby Gem.
source 'http://rubygems.org'
ruby "2.0.0"
gem "jenkins_api_client"
gem "pry"
gem "json"