This file contains 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
from selenium import webdriver | |
from selenium.common.exceptions import ElementClickInterceptedException | |
from selenium.common.exceptions import StaleElementReferenceException | |
import time | |
import json | |
# from selenium.webdriver.firefox.options import Options | |
BASE_URL = 'https://guiadentistas.es/' | |
NPAGES = 402 |
This file contains 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 | |
API_KEY = "" | |
API_SECRET = "" | |
import time, base64, hashlib, hmac, urllib.request, json | |
api_nonce = bytes(str(int(time.time()*1000)), "utf-8") | |
api_request = urllib.request.Request("https://api.kraken.com/0/private/GetWebSocketsToken", b"nonce=%s" % api_nonce) | |
api_request.add_header("API-Key", API_KEY) |
This file contains 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 | |
# Config | |
NAME="yarn" | |
column=( ["1"]="id" ["2"]="name" ["6"]="state" ["7"]="final" ["8"]="progress" ) | |
output="" | |
# code: | |
IFS=$'\n' | |
for application in $(yarn application -list -appStates ALL 2> /dev/null | tail -n+3);do |
This file contains 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 | |
# MODIFY with YOUR SHELL FILE: | |
INIT_FILE=".yourshellfile" | |
PROXY='x.x.x.x' | |
PROXY_PORT=X | |
DIRECTORY="$HOME/.orange_proxy" | |
clear_proxy(){ | |
sed -i '/.orange_proxy/d' $HOME/$INIT_FILE |
This file contains 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 <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
typedef struct | |
{ | |
char * key; | |
char * pairs; | |
} epfiot_petition; |
This file contains 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/python3 | |
import sys | |
import os | |
def is_bool(s): | |
return s == 'true' or s == 'false' | |
def is_digit(s): | |
return s.isdigit() |
This file contains 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 | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
# In this example testing cloudera-quickstart image | |
IMAGE="/home/semedi/mount/cloudera-quickstart-vm-5.13.0-0-kvm.qcow2" |
This file contains 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 | |
# example for 700GB: | |
# BLOCK_SIZE=10 | |
# off_n=(2500000 35000 17000) | |
# size=(14848 524288 1048576) | |
# | |
# 0 >= i <= 2 | |
# Sum(i) = off_n(i) * size(i) * BLOCK_SIZE = 700gb |
This file contains 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
import time | |
# This gist have only aim to provide a kind of fast cheatsheet for python3. | |
# In the file we will find some useful methods and example about how to use them. | |
# you can include any dirty trick of vanilla python3 that you use daily or whatever you like | |
# Only python3 vanilla imports are allowed | |
# Main purpose is not to have basic stuff like syntax or operators, instead of that | |
# try to use them in a custom example |
This file contains 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
# i3 config file (v4) | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! | |
# Set mod key (Mod1=<Alt>, Mod4=<Super>) | |
set $mod Mod4 | |
# set default desktop layout (default is tiling) | |
# workspace_layout tabbed <stacking|tabbed> | |
# Configure border style <normal|1pixel|pixel xx|none|pixel> |
NewerOlder