Save the toggle_visibility.sh
in your home
directory
$ chmod +x toggle_visibility.sh
const createLogger = (backgroundColor, color) => { | |
const logger = (message, ...args) => { | |
if (logger.enabled === false) { | |
return; | |
} | |
console.groupCollapsed( | |
`%c${message}`, | |
`background-color: ${backgroundColor}; color: ${color}; padding: 2px 4px;`, | |
...args |
#feito por https://twitter.com/guilhermeslcs | |
class Professor: | |
def __init__(self, nome, instituto, funcao, salario): | |
self.nome = nome | |
self.instituto = instituto | |
self.funcao = funcao | |
self.salario = salario | |
f = open("salarios.txt", "r") |
#Webpack + ES6 + Sass + Live reload
Basic example of webpack config to work with sass, es6 and live reload.
To get live reload working you need:
The following guide will show you how to deploy a simple microservice written in JavaScript using 𝚫 now.
It uses Open Source tools that are widely available, tested and understood:
This blog post has helped me clean up my postgres development environment on Mac. So making a copy!
How completely uninstall PostgreSQL 9.X on Mac OSX
This article is referenced from stackoverflow:
If installed PostgreSQL with homebrew , enter brew uninstall postgresql
If you used the EnterpriseDB installer , follow the following step.
#include <stdio.h> | |
int main(void) { | |
int valor_saque = 0, nota100 = 0, nota50 = 0, nota20 = 0, nota10 = 0, resto100 = 0, resto50 = 0, resto20 = 0, resto10 = 0; | |
printf("Digite valor do saque: \n"); | |
scanf("%d", &valor_saque); | |
if(valor_saque = ""); | |
break; | |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
#!/bin/bash | |
# Stop all containers | |
containers=`docker ps -a -q` | |
if [ -n "$containers" ] ; then | |
docker stop $containers | |
fi | |
# Delete all containers | |
containers=`docker ps -a -q` | |
if [ -n "$containers" ]; then | |
docker rm -f -v $containers |
angular.module('app',[]) | |
.directive('preventEnterSubmit', function () { | |
return function (scope, el, attrs) { | |
el.bind('keydown', function (event) { | |
if (13 == event.which) { | |
event.preventDefault(); // Doesn't work at all | |
window.stop(); // Works in all browsers but IE... | |
document.execCommand('Stop'); // Works in IE | |
return false; // Don't even know why it's here. Does nothing. | |
} |