Skip to content

Instantly share code, notes, and snippets.

Avatar
👩‍💻
forever coding

Benjamin benjaminadk

👩‍💻
forever coding
View GitHub Profile
@benjaminadk
benjaminadk / schumacher.json
Created Jan 5, 2020
schumacher scrape 20200104
View schumacher.json
This file has been truncated, but you can view the full file.
@benjaminadk
benjaminadk / upsells.vba
Created Jan 4, 2020
Product upsell/crosssell/linking excel macro vba
View upsells.vba
Sub GenerateUpsellCSV()
'
' Macro1 Macro
'
' Find out how many rows are used and save as variable
lastrow = ActiveSheet.UsedRange.Rows.Count
' Insert formulas across the first row of data
View google.day.yaml
sources:
omv:
type: OMV
max_zoom: 10.5
min_display_zoom: 10.5
tiled: true
scene:
background:
color: global.land_color
@benjaminadk
benjaminadk / .bash_aliases
Last active Aug 27, 2019
my bash aliases
View .bash_aliases
alias bashreload="source ~/.bashrc && echo Bash config reloaded" # reload bashrc
alias histg="history | grep" # seach history $1
alias mkdir="mkdir -pv" # make parent dirs as needed
alias q="exit" # quit
alias c='clear' # clear screen
alias h="history | grep" # search command history
alias p="cat" # print file
alias ~='cd ~' # home dir
alias cd..='cd ..' # back one dir
@benjaminadk
benjaminadk / javascript.json
Created Aug 23, 2019
styled component snippets
View javascript.json
{
"react-import": {
"prefix": "ir",
"body": "import React from 'react'"
},
"styled-components import": {
"prefix": "st",
"body": ["import styled from 'styled-components'", "$1"]
},
"styled-components file template": {
@benjaminadk
benjaminadk / lakers.js
Created Jun 25, 2019
lakers points production by player 2018-19
View lakers.js
export default [
{
name: 'Kyle Kuzma',
points: 1308
},
{
name: 'Kentavious Caldwell-Pope',
points: 938
},
{
@benjaminadk
benjaminadk / thumbnail-creator.js
Created Jun 15, 2019
aws lambda thumbnail/gif creator
View thumbnail-creator.js
process.env.PATH = process.env.PATH + ':' + process.env['LAMBDA_TASK_ROOT']
const AWS = require('aws-sdk')
const { spawn, spawnSync } = require('child_process')
const { createReadStream, createWriteStream } = require('fs')
const { request } = require('http')
const s3 = new AWS.S3()
const ffprobePath = '/opt/nodejs/ffprobe'
const ffmpegPath = '/opt/nodejs/ffmpeg'
@benjaminadk
benjaminadk / video-data.js
Created Feb 14, 2019
video data for clone components tutorial
View video-data.js
export default [
{
title: "Clone Components Video 1: YouTube Tags Long Title Example",
author: "Benjaminadk",
verified: false,
thumbURL:
"https://faketube.s3.amazonaws.com/user/cjs0bzggl1mzk0968blbwxie7/thumbnails/clone.jpeg",
previewURL:
"https://faketube.s3.amazonaws.com/user/cjs0bzggl1mzk0968blbwxie7/thumbnails/clone-components-youtube-tags-part-3-preview.gif",
duration: 459,
@benjaminadk
benjaminadk / datamodel.graphql
Last active Nov 28, 2018
chingu7 graphql data model
View datamodel.graphql
type User {
id: ID! @unique
name: String!
email: String! @unique
image: String
password: String # tradition email/password login
oauthId: String # if oauth login is used
posts: [Post]
reviews: [Review]
createdAt: DateTime!
@benjaminadk
benjaminadk / models.js
Last active Nov 26, 2018
chingu-7-data-model
View models.js
const categories = ['react', 'jquery', 'angular', 'vue']
const subCategories = ['documentation', 'tutorial', 'book']
const user = {
id: String, // generated by db
username: String, // unique
password: String, // if we use text password
email: String, // unique
oauthId: String, // if we use oauth