Skip to content

Instantly share code, notes, and snippets.

View ZackStone's full-sized avatar
⚠️
Loading...

Zack Stone ZackStone

⚠️
Loading...
View GitHub Profile
OUTFILE=output_$(date +"%Y-%m-%d_%H-%m-%S").json
while read PROXY; do
IP=$(curl -x $PROXY -s https://api.ipstack.com/check?access_key={enter_your_ipstack_access_key_here})
echo $IP >> $OUTFILE
printf "\n" >> $OUTFILE
done <proxies.txt
@ZackStone
ZackStone / Dockerfile
Created March 5, 2019 07:39
Arquivo Dockerfile para uma api em nodejs.
FROM node:8
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json ./
@ZackStone
ZackStone / gist:c1f7b5869d7c1ef519f0ed8a1b336c07
Created August 24, 2018 10:43
Delete all Docker containers and containers
#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
protected void Application_Error(object sender, EventArgs e)
{
// Get the exception object.
Exception ex = Server.GetLastError();
// Log the exception and notify system operators
Logger.GravarLogErro(ex);
// Em modo debug, deixa estourar a exceção na tela
CompilationSection compilationSection = (CompilationSection)ConfigurationManager.GetSection(@"system.web/compilation");
{
"font_face": "Fira Code",
"font_size": 13,
"theme": "Material-Theme-Darker.sublime-theme",
"color_scheme": "Monokai.sublime-color-scheme",
"always_show_minimap_viewport" : true,
"bold_folder_labels" : true,
"font_options" : ["gray_antialias", "subpixel_antialias"], // On retina Mac & Windows
@ZackStone
ZackStone / comandos-linux.txt
Created December 27, 2017 15:40
Comandos básicos Linux
########################################################
# Diretórios
# https://www.howtogeek.com/117435/htg-explains-the-linux-directory-structure-explained/
########################################################
/ Diretório "root" onde tudo está localizado
/bin Binários essenciais (programas) dos usuários
/boot Arquivos binários do Kernel e boot do sistema
/dev Dispositivos. Pendrives, HDs, CD-Room, ...
/etc Arquivos de configuração
@ZackStone
ZackStone / chatbot-ti.py
Created December 21, 2017 13:29
Exportar dados do bot para planilha
# -*- coding: utf-8 -*-
"""
Created on Thu Dec 21 10:32:59 2017
@author: yitzhak.andrade
Extrair as intenções identificadas e os textos digitados pelos usuários e exportar para uma planilha.
"""
@ZackStone
ZackStone / teste-decorator.py
Created December 11, 2017 17:37
teste decorator python
# -*- coding: utf-8 -*-
"""
Created on Thu Nov 16 09:20:32 2017
@author: yitzhak.andrade
"""
class Decorator:
def verificacao(parametro):
$(document).ajaxSuccess(function (event, jqXHR, ajaxSettings) {
function extrairUrlRedirecionamento(jqXHR) {
try {
var dados = $.parseJSON(jqXHR.responseText);
if (dados == null) {
return null;
}
if (dados.RedirecionarPara == null) {