Skip to content

Instantly share code, notes, and snippets.

💭
Living the dream

Zack Kollar SeedyROM

View GitHub Profile
@SeedyROM
SeedyROM / styled-wrapper.tsx
Last active Jan 11, 2019
A simple helper to create functional Vue components with CSS modules and Typescript.
View styled-wrapper.tsx
import { componentFactory } from 'vue-tsx-support';
import { VNode } from 'vue';
type Styles = string | Array<string>;
interface WrapperProps {
as?: string;
}
export default (
@SeedyROM
SeedyROM / map-globals.scss
Last active Dec 28, 2018
SCSS & CSS variable global mixin.
View map-globals.scss
// ----
// libsass (v3.5.4)
// ----
@function is-map($value) {
@return type-of($value) == 'map';
}
@mixin _globals($map, $prefix: '') {
@each $key,
@SeedyROM
SeedyROM / settings.json
Last active Nov 27, 2018
My VSCode settings for Vue development!
View settings.json
{
"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
},
{
View Django Project Setup.md

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 / index.md
Created Mar 7, 2018
Django startproject guide.
View index.md

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 / update-vscode.sh
Created Feb 9, 2018
A quick shell script to update VSCode on Linux.
View update-vscode.sh
# 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 / resetmigrations.py
Last active Sep 24, 2017
Django: Reset Applcation Migrations Command
View resetmigrations.py
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.
View setup_env.sh
#!/usr/bin/env bash
#
# A simple script to setup the development env.
#
ENV_NAME="env"
DEPS_FILE="requirements.txt"
if [[ $# -eq 1 ]]; then
You can’t perform that action at this time.