Skip to content

Instantly share code, notes, and snippets.

View SeedyROM's full-sized avatar
🚂
Coding Time

Zack Kollar SeedyROM

🚂
Coding Time
View GitHub Profile
#!/usr/bin/env bash
#
# A simple script to setup the development env.
#
ENV_NAME="env"
DEPS_FILE="requirements.txt"
if [[ $# -eq 1 ]]; then
@SeedyROM
SeedyROM / resetmigrations.py
Last active September 24, 2017 14:00
Django: Reset Applcation Migrations Command
import glob
import os
from django.conf import settings
from django.core.management import call_command
from django.core.management.base import BaseCommand, CommandError
class Command(BaseCommand):
"""A command to remove all migrations from django apps.
@SeedyROM
SeedyROM / update-vscode.sh
Created February 9, 2018 20:15
A quick shell script to update VSCode on Linux.
# Update VS Code.
function update-vscode() {
wget https://vscode-update.azurewebsites.net/latest/linux-deb-x64/stable -O /tmp/code_latest_amd64.deb
sudo dpkg -i /tmp/code_latest_amd64.deb
}
update-vscode
@SeedyROM
SeedyROM / index.md
Created March 7, 2018 07:23
Django startproject guide.

How to start a Django project  (PDXCG Style)

Open a terminal and go to wherever you want to create your project!

Make sure to replace $PROJECT_NAME with your own project name. Your project name should be named in snake_case and contain no captial letters.

The Steps

  1. Create a directory
  • mkdir $PROJECT_NAME
@SeedyROM
SeedyROM / settings.json
Last active November 27, 2018 09:37
My VSCode settings for Vue development!
{
"vetur.format.defaultFormatter.js": "vscode-typescript",
"vetur.format.defaultFormatter.html": "js-beautify-html",
"javascript.format.insertSpaceBeforeFunctionParenthesis": true,
"eslint.autoFixOnSave": true,
"eslint.validate": [{
"language": "vue",
"autoFix": true
},
{
@SeedyROM
SeedyROM / map-globals.scss
Last active December 28, 2018 09:44
SCSS & CSS variable global mixin.
// ----
// libsass (v3.5.4)
// ----
@function is-map($value) {
@return type-of($value) == 'map';
}
@mixin _globals($map, $prefix: '') {
@each $key,
@SeedyROM
SeedyROM / styled-wrapper.tsx
Last active January 11, 2019 13:44
A simple helper to create functional Vue components with CSS modules and Typescript.
import { componentFactory } from 'vue-tsx-support';
import { VNode } from 'vue';
type Styles = string | Array<string>;
interface WrapperProps {
as?: string;
}
export default (
@SeedyROM
SeedyROM / query-params.js
Last active May 13, 2019 08:37
Functional helper to build query parameters for GET requests.
const buildQueryParams = (params) => (
Object
.keys(params)
.reduce((q, k) => q + `${k}=${params[k]}&`, '?')
.slice(0, -1)
);
// Usage:
const queryParams = buildQueryParams({
hello: 'world',
@SeedyROM
SeedyROM / Django Project Setup.md
Last active May 13, 2019 08:39
Django Project: How To? (venv)

How to start a Django project  (PDXCG Style)

Open a terminal and go to wherever you want to create your project!

Make sure to replace $PROJECT_NAME with your own project name. Your project name should be named in snake_case and contain no captial letters.

The Steps

  1. Create a directory
  • mkdir $PROJECT_NAME
@SeedyROM
SeedyROM / .shortcutsrc
Created August 10, 2019 03:05
Shortcuts for my Linux Box
# General Shortcuts
alias wifi="wicd-curses"
alias connections="sudo iftop -i wlp4s0"
alias restart-network="sudo service network-manager restart"
alias work="cd ~/Workspace"
alias dc="docker-compose"
# Mistake Shortcuts
alias gti="git"