This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[react-class-to-functional-component] | |
# Geven this as input this should rewrite it in a functional component | |
#export class Example extends React.Component { | |
# componentDidMount() { | |
# // hii from componentDidMount | |
# } | |
# componentWillUnmount() { | |
# // hii from componentWillUnmount |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install-Module posh-git | |
Install-Module oh-my-posh -Scope CurrentUser | |
Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
import re | |
import os | |
import logging | |
import requests | |
import threading | |
from ftplib import FTP | |
logging.basicConfig(level=logging.INFO, format='[%(name)s][%(levelname)s] %(message)s') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var ds = []; | |
function addtods(nodes) { | |
for (var i in nodes) { | |
ds.push(nodes[i]); | |
} | |
} | |
setInterval(function () { | |
ds = []; | |
addtods(document.getElementsByTagName('div')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var path = require('path'); | |
var webpack = require('webpack'); | |
// https://github.com/webpack/webpack/tree/master/examples/dll-user | |
// https://blog.hobbytrace.com/injecting-webpack-2-dll-with-hash-to-html-via-html-webpackplugin/ | |
// read https://github.com/webpack/docs/wiki/list-of-plugins#dllreferenceplugin | |
// https://github.com/lettertwo/appcache-webpack-plugin | |
// https://github.com/NekR/offline-plugin | |
module.exports = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function main() { | |
let a = "end"; | |
let b = "is near"; | |
let c = "dude"; | |
let output = `${b.substring(1,2)}${a} ${a.substring(1,2)}${c.substring(1, c.length)}${b.substring(1,2)}`; | |
console.log(output); | |
} | |
main(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Computes a top-shadow for a card effect. | |
* @param {Number} $depth - depth level | |
*/ @return {List} | |
@function top-shadow($depth) { | |
$primary-offset: nth(1.5 3 10 14 19, $depth) * 1px; | |
$blur: nth(1.5 3 10 14 19, $depth) * 4px; | |
$color: rgba(black, nth(.12 .16 .19 .25 .30, $depth)); | |
@return 0 $primary-offset $blur $color; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" .vimrc | |
" Author: CreativeKoen <[email protected]> | |
" Source: https://github.com/CreativeKoen/dotfiles | |
" Dein --------------------------------------------------------------------- {{{ | |
set runtimepath+=~/AppData/local/nvim/bundle/repos/github.com/Shougo/dein.vim | |
set nocompatible | |
filetype off |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
REPO='[email protected]:Servers-for-Hackers/deploy-ex.git'; | |
RELEASE_DIR='/var/www/releases'; | |
APP_DIR='/var/www/app'; | |
RELEASE="release_`date +%Y%m%d%H%M%s`"; | |
# Fetch Latest Code | |
[ -d $RELEASE_DIR ] || mkdir $RELEASE_DIR; | |
cd $RELEASE_DIR; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
root /vagrant/app/public; | |
index index.html index.htm index.php app.php app_dev.php; | |
# Make site accessible from ... | |
server_name 192.168.22.45.xip.io vaprobash.dev; |
NewerOlder