Skip to content

Instantly share code, notes, and snippets.

View simonv3's full-sized avatar

Psi simonv3

  • Wherever there is danger
View GitHub Profile

A significant amount of press (a selection that is by no means exhaustive has been linked below) has been given to companies and organizations that are doing 4 day/8 hour work weeks without a change in compensation. Organizations that adopted a 4 day work week experienced

  • Sustained or improved productivity.
  • Worker happiness increased dramatically.
  • Stress, burnout and turnover decreased.
  • Companies had an easier time attracting and retaining talent.
  • Customer outcomes improved.
  • Number of sick days declined.
  • Carbon footprints could be reduced significantly.
@anxiousmodernman
anxiousmodernman / roll_call.md
Last active July 8, 2017 02:13
DSA (Democratic Socialists of America) GitHub orgs
@dahjelle
dahjelle / pre-commit.sh
Created July 13, 2016 16:48
Pre-commit hook for eslint, linting *only* staged changes.
#!/bin/bash
for file in $(git diff --cached --name-only | grep -E '\.(js|jsx)$')
do
git show ":$file" | node_modules/.bin/eslint --stdin --stdin-filename "$file" # we only want to lint the staged changes, not any un-staged changes
if [ $? -ne 0 ]; then
echo "ESLint failed on staged file '$file'. Please check your code and try again. You can run ESLint manually via npm run eslint."
exit 1 # exit with failure status
fi
done

Development Software

  • VirtualBox - Virtualization software for running local operating systems within your computer. This let's us have a full version of linux within our computers that better matches how a live webserver works.
  • Vagrant - A tool for provisioning virtual machines.
  • VVV - A pre-built, community supported Vagrant configuration for WordPress development.
  • Git - Version control system for managing code during development. Easily allows for tracking changes, and merging new code into an existing project.
  • SourceTree - A GUI available on Windows and Mac for managing Git projects. This makes Git much easier to use, as we won't have to learn the command line interface.
  • GitHub.com - A website that provides free Git repos for both open source and private projects.
  • SASS - (we'll use the SCSS flavor) A CSS preprocessor that allows us to write much less CSS for a project. This basically makes CSS into a simple programming language.
@daggerhart
daggerhart / 1.WordPress-Developer-Environment-Setup.md
Last active March 26, 2023 14:50
Modern WordPress Theme Development

Development Software

  • VirtualBox - Virtualization software for running local operating systems within your computer. This allows us have a full version of linux within our computers that better match how a live webserver works.
  • Vagrant - A tool for provisioning (creating) virtual machines.
  • VVV - A pre-built, community-supported Vagrant configuration for WordPress development.
  • Git - Version control system for managing code during development. Easily allows for tracking changes, and merging new code into an existing project.
  • SourceTree - A GUI available on Windows and Mac for managing Git projects. This makes Git much easier to use, as we won't have to learn the command line interface.
  • Github.com - A website that provides free Git repositories for both open source and private projects.
  • SASS - (SCSS) A CSS preprocessing implementation that allows us to write much less CSS for a project. This basically makes CSS into a simple programming language.
@linhmtran168
linhmtran168 / pre-commit-eslint
Last active February 6, 2024 12:28
Pre-commit hook to check for Javascript using ESLint
#!/bin/sh
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".jsx\{0,1\}$")
if [[ "$STAGED_FILES" = "" ]]; then
exit 0
fi
PASS=true
@cblavier
cblavier / embedded_findable.rb
Last active April 8, 2017 14:30
Helps to override find method for a Mongoid embedded document.
module Mongoid
# Helps to override find method in an embedded document.
# Usage :
# - add to your model "include Mongoid::EmbeddedFindable"
# - override find method with:
# def self.find(id)
# find_through(Book, 'chapter', id)
# end
module EmbeddedFindable
function map (arr, func) {
return Promise.resolve().then(function () {
return arr.map(function (el) { return func(el) })
}).all()
}
function mapSeries (arr, func) {
let currentPromise = Promise.resolve()
let promises = arr.map(function (el) {
return currentPromise = currentPromise.then(function () {
@niallo
niallo / gist:3109252
Created July 14, 2012 04:54
Parse Github `Links` header in JavaScript
/*
* parse_link_header()
*
* Parse the Github Link HTTP header used for pageination
* http://developer.github.com/v3/#pagination
*/
function parse_link_header(header) {
if (header.length == 0) {
throw new Error("input must not be of zero length");
}