Skip to content

Instantly share code, notes, and snippets.

View codewithcats's full-sized avatar
🐱
Building something big

Tanawat Tassana codewithcats

🐱
Building something big
View GitHub Profile
@codewithcats
codewithcats / sketch_cheat_sheet.md
Last active April 15, 2019 16:06
Sketch Cheat Sheet

Sketch Cheat Sheet

Artboard

  • a -> create new artboard
  • <select element>, a, New from selection -> convert element to artboard
  • Cmd + 3 -> move center to selected artboard

Element

  • Cmd + r -> rename element, artboard
@codewithcats
codewithcats / index.html
Created December 5, 2018 03:20
HTML5 Responsive Blank Template
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
</head>
<body>
</body>
</html>
@codewithcats
codewithcats / ubuntu-powerline-install.md
Last active June 20, 2018 12:22 — forked from petercossey/ubuntu-powerline-install.md
Powerline font install for Ubuntu 16.10

Install Powerline fonts for Z shell

If you're using Z Shell and a special prompt theme designed with Powerline fonts in mind, you'll need to install them on your machine. These are the most clear and cut-down instructions that I've found to work with Ubuntu 16.10 and all credit goes to renshuki's Ubuntu 14.04 + Terminator + Oh My ZSH with Agnoster Theme gist. I've extracted just the Powerline font instructions - my personal setup uses Prezto instead of Oh My ZSH (not included here).

Get the font and config files

cd ~
wget https://github.com/powerline/powerline/raw/develop/font/PowerlineSymbols.otf
wget https://github.com/powerline/powerline/raw/develop/font/10-powerline-symbols.conf
@codewithcats
codewithcats / StupidContract.sol
Created November 29, 2017 15:29
Stupid whitelist contract
pragma solidity ^0.4.8;
contract StupidContract {
mapping(address => uint) whitelist;
function Htkn() public {
}
// no lens
// read
const currentRoute = state.routing.current
// write
state.routing.current = route
// with lens
// create lens using Ramdajs
const currentRouteLens = R.lensPath(['routing', 'current'])
// read
@codewithcats
codewithcats / blank.html
Created October 14, 2016 19:54
Blank HTML Template
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>My Application</title>
</head>
<body>
<!-- page content -->
</body>
</html>
@codewithcats
codewithcats / webpack.config.js
Created September 23, 2016 21:51
Basic webpack+babel setup
var webpack = require('webpack');
var path = require('path');
var config = {
entry: {
hello: path.join(__dirname, 'src', 'hello.js'),
},
module: {
loaders: [
{
@codewithcats
codewithcats / README.md
Created August 23, 2016 07:57 — forked from mwise/README.md
Git hook to prevent merging staging branch into master branch

To use this hook:

  • add the prepare-commit-msg file at .git/hooks/prepare-commit-msg and edit as needed
  • make it executable: chmod +x .git/hooks/prepare-commit-msg
  • disable fast-forward merges: git config branch.master.mergeoptions "--no-ff"
  • that's it!

NOTE: after a failed merge from a forbidden branch, the working tree will still be in a MERGING state. To discard the local working copy state, run: git reset --merge

@codewithcats
codewithcats / webpack.config.js
Created August 14, 2016 10:53
A webpack config with chunk settings
var webpack = require('webpack');
var Html = require('html-webpack-plugin');
var merge = require('webpack-merge');
var validate = require('webpack-validator');
var path = require('path');
var PATHS = {
src: path.join(__dirname, 'src'),
dist: path.join(__dirname, 'dist'),
@codewithcats
codewithcats / webpack.config.parts.js
Created August 14, 2016 10:51
Common webpack helper functions
var webpack = require('webpack');
var CommonsChunkPlugin = webpack.optimize.CommonsChunkPlugin;
var ExtractTextPlugin = require('extract-text-webpack-plugin');
exports.devServer = function(options) {
return {
devServer: {
historyApiFallback: true,
inline: true,
stats: 'errors-only',