Skip to content

Instantly share code, notes, and snippets.

View SuperCipher's full-sized avatar
💭
GMT+7 08:00 - 22:00

Napat SuperCipher

💭
GMT+7 08:00 - 22:00
  • BiggestFan Production
  • Thailand
View GitHub Profile
@SuperCipher
SuperCipher / index.html
Created July 13, 2017 14:53
Material Design Menu
<div class="material-menu-wrapper">
<div class="material-menu">
<div class="material-btn">
<div class="material-hamburger">
<div class="material-patty"></div>
<div class="material-patty"></div>
<div class="material-patty"></div>
</div>
</div>
<div class="material-content">
'use strict';
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min)) + min;
}
function compareNumbers(a, b) {
return a - b;
}
var App = React.createClass({
.Charts {
margin: 0 auto;
background-color: #f9f9f9;
display: flex;
align-items: flex-end;
padding: 50px;
}
.Charts.horizontal {
display: block;
}
"use strict";
(function() {
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }();
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.ke
@SuperCipher
SuperCipher / nix-shell-ghci.sh
Last active December 4, 2020 17:48
try haskell with nix-shell ghci
#!/bin/bash
# try haskell easily with nix shell
# credit @freenode_srk:matrix.org
nix-shell -p "pkgs.haskell.packages.ghc883.ghcWithPackages (p: [ ])"
@SuperCipher
SuperCipher / commit-convention.md
Last active March 11, 2021 11:55
commit convention type and sample

Angular type

Must be one of the following:

build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
docs: Documentation only changes
feat: A new feature
fix: A bug fix

perf: A code change that improves performance

@SuperCipher
SuperCipher / TH-covid19-curve_fit.py
Created January 6, 2021 16:57
Test Thailand coronavirus graph fitting
import numpy as np
from scipy.optimize import curve_fit
import matplotlib.pyplot as plt
# %matplotlib inline
x = [46,67,81,110,121,144,155,250,194,279,216,315,745,527]
j = 0
buckets = [0] * len(x)
m = 0
@SuperCipher
SuperCipher / coincurve.py
Last active January 14, 2021 11:22
coincurve13.0.0 generate hash message from private key
coincurve 13.0.0 pypi_0 pypi
Python 3.7.4 (default, Aug 13 2019, 15:17:50)
[Clang 4.0.1 (tags/RELEASE_401/final)] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from cryptography.hazmat.backends import default_backend
>>> from cryptography.hazmat.primitives.asymmetric import rsa
>>> private_key = rsa.generate_private_key(
... public_exponent=65537,
... key_size=2048,