Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍🔬
cheersEveryone

Adam Piskorek hvitis

👨‍🔬
cheersEveryone
View GitHub Profile
@hvitis
hvitis / imagewiththumbnails_updateable.py
Created Feb 13, 2021 — forked from valberg/imagewiththumbnails_updateable.py
Django create thumbnail form ImageField and save in a different ImageField - now with updating!
View imagewiththumbnails_updateable.py
# Extension of http://www.yilmazhuseyin.com/blog/dev/create-thumbnails-imagefield-django/
# Note: image_folder and thumbnail_folder are both a callable (ie. a lambda that does a '/'.join())
class Image(Media):
image = models.ImageField(
upload_to=image_folder
)
thumbnail = models.ImageField(
@hvitis
hvitis / Count lines in Git repo
Created Jan 30, 2021 — forked from mandiwise/Count lines in Git repo
A command to calculate lines of code in all tracked files in a Git repo
View Count lines in Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l
@hvitis
hvitis / load_dotenv.sh
Created Jan 28, 2021 — forked from mihow/load_dotenv.sh
Load environment variables from dotenv / .env file in Bash
View load_dotenv.sh
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
@hvitis
hvitis / load_dotenv.sh
Created Jan 28, 2021 — forked from mihow/load_dotenv.sh
Load environment variables from dotenv / .env file in Bash
View load_dotenv.sh
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
@hvitis
hvitis / load_dotenv.sh
Created Jan 28, 2021 — forked from mihow/load_dotenv.sh
Load environment variables from dotenv / .env file in Bash
View load_dotenv.sh
if [ ! -f .env ]
then
export $(cat .env | xargs)
fi
@hvitis
hvitis / PaperJS with GatsbyJS to use Raster mosaic functionality.
Last active Nov 30, 2020
PaperJS with GatsbyJS to use Raster mosaic functionality.
View PaperJS with GatsbyJS to use Raster mosaic functionality.
import React from "react"
import { Form, Container, Row, Col, Badge } from "react-bootstrap"
import colors from "./utils/colors.json"
import BadgeColor from "./utils/BadgeColor.tsx"
import { IoIosCheckmarkCircle, IoIosCheckbox } from "react-icons/io"
import { formatAndDownloadBsxFile } from "./utils/formatBsxFile"
import { formatAndDownloadXmlFile } from "./utils/formatXmlFile"
import { formatAndDownloadLdrFile } from "./utils/formatLDrawFile"
class PaperCanvas extends React.Component {
constructor(props) {
View gist:65d928dc1a68126b8098e2d52ff66154
```js
<file-pond
name="filepond"
ref="pond"
label-idle="Drop file here..."
v-bind:allow-multiple="false"
accepted-file-types="image/jpeg, image/png, image/jpg"
v-bind:files="myFiles"
v-on:init="handleFilePondInit" <-- Example optional hook
v-on:processfile="handleFilePondSuccessProcessed" <-- Example optional hook
View Effective_Engineer.md

FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

What's an Effective Engineer?

View elo_js.md