Skip to content

Instantly share code, notes, and snippets.

View ponchicken's full-sized avatar
🐣
Puk Puk Pukaaak

Alexander Balandin ponchicken

🐣
Puk Puk Pukaaak
View GitHub Profile
@ponchicken
ponchicken / vue.config.js
Last active July 11, 2018 09:27
[vue config] #vue #config
// CSS related options
module.exports = {
css: {
// extract CSS in components into a single CSS file (only in production)
// can also be an object of options to pass to extract-text-webpack-plugin
extract: true,
// enable CSS source maps?
sourceMap: true,
@ponchicken
ponchicken / .postcssrc.js
Last active July 11, 2018 09:27
[postcssrc] #config #postcss
module.exports = {
from: './src/assets/styles/style.css',
to: './src/assets/styles/style.map.css',
map: { inline: false },
plugins: {
autoprefixer: {},
"postcss-import": {},
"postcss-nested": {},
"postcss-css-variables": {},
"postcss-cssnext": {},
@ponchicken
ponchicken / .bashrc
Last active July 11, 2018 09:26
[Starting ssh-agent] #ssh #ssh-agent #bashrc
SSH_ENV=$HOME/.ssh/environment
# start the ssh-agent
function start_agent {
echo "Initializing new SSH agent..."
# spawn ssh-agent
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV}
echo succeeded
chmod 600 ${SSH_ENV}
. ${SSH_ENV} > /dev/null
@ponchicken
ponchicken / .env.development
Last active July 11, 2018 09:29
[react .env] env #react #env
BROWSER = none
PORT = 3004
REACT_APP_API_HOST = http://localhost:3000/api
@ponchicken
ponchicken / steps.sh
Last active July 17, 2018 14:03
[clone to new repo] git clone to push into new repository #git #clone
git clone https://github.com/YOURREPO.git TargetRepoName
cd TargetRepoName/
git remote set-url origin https://github.com/TargetRepoName.git
git push -u origin master
@ponchicken
ponchicken / index.html
Last active September 20, 2018 14:07
[text reveal animation] animate text displaying by symbol #animation #text-effect
<div class="reveal">Some Things</div>
@ponchicken
ponchicken / logger.js
Created August 9, 2018 09:57
winston logger
const winston = require('winston')
const { combine, timestamp, json, colorize, printf } = winston.format
let date = new Date().toISOString();
const logFormat = printf(function(info) {
return `${info.level} - ${date}: ${info.message}\n`;
});
module.exports = {
@ponchicken
ponchicken / .babelrc
Created August 24, 2018 09:34
Babelrc react
{
"presets": [
"env", "react"
],
"plugins": [
"transform-class-properties",
"transform-object-rest-spread"
]
}
@ponchicken
ponchicken / script.js
Created September 21, 2018 14:39
[smooth scrolling]
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function (e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
/* ==UserStyle==
@name slack grey
@namespace github.com/openstyles/stylus
@version 1.0.0
@description A new userstyle
@author ponchicken
==/UserStyle== */
@-moz-document domain("slack.com") {
body,