Skip to content

Instantly share code, notes, and snippets.


Paul Pushplaybang

Block or report user

Report or block Pushplaybang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:de8e16e78e76fb4aca0e86c6734cfeaf

BEM Cheatsheet


Block encapsulates a standalone entity that is meaningful on its own.

While blocks can be nested and interact with each other, semantically they remain equal; there is no precedence or hierarchy.

Holistic entities without DOM representation (such as controllers or models) can be blocks as well.

Pushplaybang / main.go
Created Oct 14, 2018
very simple example of concurrency in go.
View main.go
package main
import (
func main() {
links := []string{
Pushplaybang / static-fs.go
Created Oct 7, 2018
simplest static file server in Go
View static-fs.go
package main
import (
func main() {
dir, _ := os.Getwd()
Pushplaybang /
Last active Oct 7, 2018
Docker cheat sheet

MY Docker Cheat Sheet

a breif selection of essential commands, tips and notes about working with docker, as a personal reference. use at your own risk.

Working with containers

create and start a container

  • docker run [-a] <container-name> <override>

essentially runs the following two commands

  • docker create <container-name> <override>
Pushplaybang / express-static-server.js
Created Oct 6, 2018
most basic express js static server
View express-static-server.js
const path = require('path');
const express = require('express');
// x platform path
const publicPath = path.join(__dirname, './public');
// setup
const app = express();
Pushplaybang / inbox.sol
Created Sep 21, 2018
Incredibly basic toy ETH smart contract.
View inbox.sol
pragma solidity ^0.4.17;
contract Inbox {
string public message;
function Inbox(string initialMessag) public {
message = initialMessag;
function setMessage(string newMessage) public {
Pushplaybang / transitionToPromise.js
Last active Aug 21, 2018 — forked from davej/transitionToPromise.js
Do a CSS transition and resolve promise when complete
View transitionToPromise.js
const transitionToPromise = (selector, property, value) =>
new Promise(resolve => {
const el = docxument.querySelector(selector);[property] = value;
const transitionEnded = e => {
if (e.propertyName !== property) {
el.removeEventListener('transitionend', transitionEnded);
Pushplaybang /
Created Jun 28, 2018
Install and run mongo OSX

Installing Mongo on OSX with brew

We'll need to update brew, install mongo, setup the location where data will be stored and know how to stop and start the DB.

Get started:

# update brew
brew update

# install mongo

Neo4j Tutorial


Store any kind of data using the following graph concepts:

  • Node: Graph data records
  • Relationship: Connect nodes (has direction and a type)
  • Property: Stores data in key-value pair in nodes and relationships
  • Label: Groups nodes and relationships (optional)
Pushplaybang /
Created May 7, 2018 — forked from kevyworks/
Prepare Dev Machine for: Node Composer & Laravel Valet
# install brew
/usr/bin/ruby -e "$(curl -fsSL"
# Terminal Aliases
echo "alias artisan='php $PWD/artisan'" >> ~/.bash_profile
echo "export NVM_DIR=~/.nvm" >> ~/.bash_profile
echo "source $(brew --prefix nvm)/" >> ~/.bash_profile
# update brew
brew update
You can’t perform that action at this time.