Skip to content

Instantly share code, notes, and snippets.

@unicornist
unicornist / package.json
Created April 22, 2021 10:45 — forked from chalist/package.json
pckage.json for coompile and lint scss files and minify css, lint and minify js, inject css with browserSync and watch files
{
"name": "bookism",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"scripts": {
"scss": "node-sass --output-style compressed --watch src/scss -o dist/css",
"serve": "browser-sync start --proxy 0.0.0.0:9999 --files 'dist/css/*.css'",
"clean": "rimraf dist/{css/*,js/*}",
"lint": "eslint src/js || true",
@unicornist
unicornist / .colors
Last active November 30, 2020 23:23 — forked from daytonn/.colors
Bash Color functions
black="\033[0;30m"
blackb="\033[1;30m"
white="\033[0;37m"
whiteb="\033[1;37m"
red="\033[0;31m"
redb="\033[1;31m"
green="\033[0;32m"
greenb="\033[1;32m"
yellow="\033[0;33m"
yellowb="\033[1;33m"
@unicornist
unicornist / index.jsx
Last active October 30, 2018 19:25 — forked from rhernandog/index.jsx
React & Recompose withProps - A simple example of using recompose's withProps
// styles for this are based on Bootstrap 3.3.7
import React, { Component } from "react";
import ReactDOM from "react-dom";
import { withProps } from "recompose";
const users = [
{ "name": "Homer Jay", "status": "pending" },
{ "name": "El Barto", "status": "active" },
{ "name": "SideshowBob", "status": "active" }
];
@unicornist
unicornist / generatePassword.js
Last active July 2, 2016 12:03 — forked from smhnaji/generatePassword.php
Generate secure and readable password
// just translated from the php version (I have to optimise it)
function generatePassword (length) {
if(!length) length = 8;
var sets = ['abcdefghjkmnpqrstuvwxyz', 'ABCDEFGHJKMNPQRSTUVWXYZ', '23456789', '~!@#$^*()_.-=+'];
var all = '';
var password = '';
sets.forEach(function(set){
set = shuffle(set);
password += set[0];