Skip to content

Instantly share code, notes, and snippets.

View nioperas06's full-sized avatar

Junior Gantin nioperas06

View GitHub Profile
@reinink
reinink / DateInput.vue
Created August 27, 2019 11:51
Pikaday Vue Component
<template>
<div>
<label v-if="label" class="form-label" :for="`date-input-${_uid}`">{{ label }}:</label>
<input v-bind="$attrs" class="form-input" :id="`date-input-${_uid}`" :class="{ error: error }" type="text" ref="input" :value="value" @change="change" @keyup="change">
<div v-if="error" class="form-error">{{ error }}</div>
</div>
</template>
<script>
import pikaday from 'pikaday'
@developit
developit / *valoo.md
Last active November 13, 2023 08:39
🐻 Valoo: just the bare necessities of state management. 150b / 120b. https://npm.im/valoo

🐻 valoo

just the bare necessities of state management.

Usage

Hotlink it from https://unpkg.com/valoo.

See Interactive Codepen Demo.

@igogrek
igogrek / How I stopped loving Angular.md
Last active April 2, 2024 03:00
How I stopped loving Angular

I've worked with AngularJS for many years now and still use it in production today. Even though you can't call it ideal, given its historically-formed architecture, nobody would argue that it became quite a milestone not only for evolution of JS frameworks, but for the whole web.

It's 2017 and every new product/project has to choose a framework for development. For a long time I was sure that new Angular 2/4 (just Angular below) will become the main trend for enterprise development for years to come. I wasn't even thinking of working with something else.

Today I refuse to use it in my next project myself.

import hashlib as hasher
import datetime as date
# Define what a Snakecoin block is
class Block:
def __init__(self, index, timestamp, data, previous_hash):
self.index = index
self.timestamp = timestamp
self.data = data
self.previous_hash = previous_hash
@jhwheeler
jhwheeler / bigONotation.js
Last active July 12, 2024 13:23
Big O Notation Exercises
// 1. Even or odd
function isEven(value){
if (value % 2 == 0){
return true;
}
else
return false;
}
@RaminNietzsche
RaminNietzsche / image_stof.py
Created April 9, 2017 10:57
Python flask upload base64 image
import base64
from io import BytesIO
from PIL import Image
file = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAcAAAAHACAYAAAA1JbhzAAAgAElEQVR4Xoy96ZKt3XKVt5p97pmgMSDAdI6wABMWdiB+yEgQQoBN38h34HMkjiTEraCqtYgc4xmZOd+qT+EtON/eVWu9zZzZjBzZzPuf+Y2fv+/v2+19e91u98ftcb/dPl/v2/N2v71v79vtdr/Vb+s/79dNfx6P2+31ft/u9/pd/fau79W/3++60ut2fz1ut4e/7c/oJvrM/f6+vd/32+N9u32+b7rXq65/e90e9/re+/aqX9Rn+b7+w/1ubz+Zf1T3vt9eLz9cninfrWeuF6zn0mfrWd5ctV6cN6z3edyft9f7k2f0c75u79vj9tSz1bff70/97FnP+ao3rcd91EvUwun56xO1IHlGrdn9x+19+6yFu9Vb1RvkWe+v9+398HrUf+tVtMZcoR5Tz32v+7/0NJ999R+35+2z/13Xut/rYW5a07qK//eu79Uz1Xp/1lPUhete7/utlqT++al98P77+/lTT+Br1XPWs2kv65lrP0oAstestaRHH6h7WTYe9bs361wXuj18LV3zfnve57m1T6/b7VnXrjUq2by9bz/qWWu5tY48T/2s9roeMz971bVqvfIutX7elfqZJful69Sf+p3ur/evfaxrzi6+63k/7tprfRe5q2vVn+zJo/5dz/L0Netr9f4fklGvWcmsZarWxd/V52rj37W/dU0/u69bP3/d7qVfev/77V6y8raEavV41Fon3VfX9nUka6UHein//zeyohW4l3RoEdBWXQQLUM9dMuUb1Ecsu++2A+9Xyf7T+lA/r/dHDu6lz+icf1bPW+vw0p56S7APWleLWq3vo97x86131f3Qn9ipeo96z3qtkpHS+/f9pWtKFPQ6tRYlZ/V/slYtuyUfdcO6V62tzCDrV+8ou1
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active June 7, 2024 20:53
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

@btroncone
btroncone / ngrxintro.md
Last active June 26, 2024 08:27
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

Comprehensive Introduction to @ngrx/store

By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@subfuzion
subfuzion / curl.md
Last active July 25, 2024 08:53
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@mrabbani
mrabbani / mailgun-config.md
Last active January 8, 2024 01:45
Laravel Mailgun Setup