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
set sts=2 | |
set ts=2 | |
set sw=2 | |
set et | |
set number | |
set encoding=utf-8 | |
syntax on | |
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o | |
autocmd BufReadPost,BufNewFile *.elm setfiletype haskell |
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
#include <iostream> | |
#include <stdio.h> | |
using namespace std; | |
void printDouble(double d) { | |
unsigned long long i = *(unsigned long long *) &d; | |
for(int j = 63; j >= 0; j--) { | |
cout << ((i >> j) & 1); |
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
// Evitar que o wordpress redirecione caso o host e porta | |
// utilizados para acessar o cms sejam diferente daqueles | |
// configurados na instalação | |
// Adicionar no fim do arquivo wp-load.php | |
remove_all_actions('template_redirect'); |
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
#!/bin/bash | |
# I'm using "Aug 22" as a date example, you MUST replace this information. | |
cat /var/log/secure | | |
grep '^Aug 22' | | |
grep 'Failed' | | |
sed -r 's/^.*? ([0-9]{1,3}(\.[0-9]{1,3}){3}).*/https:\/\/db-ip.com\/\1/' | | |
sort | | |
uniq |
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() { | |
function Zumber(array) { | |
if(!(this instanceof Zumber)) | |
return new Zumber(array); | |
if(!( | |
array instanceof Array && | |
array.length > 10 && | |
array.every(function(item, index) { | |
return typeof(item) === 'string' && item.length === 1 && !~array.indexOf(item, index + 1); |
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
#!/bin/bash | |
# Created at 2018-10-15 | |
# CHECKUPS | |
echo "LAST CHANCE TO BACK UP YOUR OLD CERTIFICATES!" | |
echo "" | |
read | |
echo "THE DESIGNATED DOMAIN MUST BE ACCESSIBLE FROM THE INTERNET FOR OWNERSHIP VERIFICATION!" |
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
# Source | |
# https://stackoverflow.com/a/20431030 | |
# Turn off docker service | |
sudo service docker stop | |
# Delete iptables | |
sudo iptables -t nat -F | |
# Bring docker ethernet interface down |
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
# -*- coding: utf-8 -*- | |
""" | |
$ python dynamic_decorator.py | |
func_to_be_dynamically_decorated(1, 2) | |
3 | |
unreg = add_dynamic_decorator('func_to_be_dynamically_decorated', dynamic_decorator_1) | |
<function unreg at 0x7f5260d1f9b0> | |
func_to_be_dynamically_decorated(1, 2) | |
4 |
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
<?php | |
// UDC = Unidade Dezena Centena | |
function numeroParaTextoUDC($numero) { | |
$_ucd = "$numero"; | |
while(strlen($_ucd) < 3) | |
$_ucd = "0$_ucd"; | |
switch(+$_ucd) { | |
case 0: return array("zero"); |
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
Show hidden characters
{ | |
"animation_enabled": false, | |
"auto_close_tags": false, | |
"auto_complete": false, | |
"auto_complete_commit_on_tab": false, | |
"auto_complete_with_fields": false, | |
"auto_indent": false, | |
"auto_match_enabled": false, | |
"caret_style": "blink", |
OlderNewer