Skip to content

Instantly share code, notes, and snippets.

View intermundos's full-sized avatar

Anton St. intermundos

View GitHub Profile
@intermundos
intermundos / .editorconfig
Created August 15, 2018 09:44
.editorconfig
# top-most EditorConfig file
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
# 4 space indentation
[*.py]
@intermundos
intermundos / on-esc-react.js
Last active July 8, 2018 08:14
React on Esc event
onESCpressed = (e) => {
e.keyCode === 27 && some_Func()
}
componentDidMount() {
document.addEventListener('keydown', this.onESCpressed, false)
}
componentWillUnmount() {
document.removeEventListener('keydown', this.onESCpressed, false)
@intermundos
intermundos / get-server.php
Created September 29, 2017 21:59
Display SERVER info WP
<?php
$indicesServer = array('PHP_SELF',
'argv',
'argc',
'GATEWAY_INTERFACE',
'SERVER_ADDR',
'SERVER_NAME',
'SERVER_SOFTWARE',
'SERVER_PROTOCOL',
@intermundos
intermundos / nodemon.json
Created July 11, 2017 09:32
nodemon.json
{
"restartable": "rs",
"ignore": [
".git",
"node_modules/**/node_modules"
],
"verbose": true,
"watch": [
"server"
],
@intermundos
intermundos / ssh.sh
Created June 8, 2017 11:38
ssh generqation
ssh-keygen -t rsa -C "your_email@example.com"
{
"presets": ["latest", "react", "stage-0"]
}
@intermundos
intermundos / string.js
Created May 21, 2017 09:55
String search
const func = (s, a, b) => !s ? -1 : Math.max(s.lastIndexOf(a), s.lastIndexOf(b))
@intermundos
intermundos / bulma.css
Created April 22, 2017 08:59
bulma-docs.css
@charset "UTF-8";
/*! bulma.io v0.4.0 | MIT License | github.com/jgthms/bulma */
@-webkit-keyframes spinAround {
from {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
to {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
@intermundos
intermundos / image-swap.html
Created April 20, 2017 11:39
Swapping images JS
<!DOCTYPE html>
<html>
<head>
<title>change picture</title>
<script type = "text/javascript">
function displayNextImage() {
x = (x === images.length - 1) ? 0 : x + 1;
document.getElementById("img").src = images[x];
}
@intermundos
intermundos / meta viewport
Created April 19, 2017 11:44
Meta viewport
<meta name="viewport" content="width=device-width, initial-scale=1">