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 () { | |
this.Logger = function(){ | |
var defaults = { | |
style : 'background: white; color: black; display: block;', | |
tag: 'DEFAULT' | |
}; | |
if (arguments[0] && typeof arguments[0] === "object") { | |
this.options = _extendDefaults(defaults, arguments[0]); |
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
import sys | |
import re | |
import json | |
import requests | |
import nltk | |
import random | |
import time | |
# id and key from https://developer.oxforddictionaries.com/ | |
app_id = '' |
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 | |
TEMP_DATA=$(wget https://www.torproject.org/download/download-easy.html.en -q -O - | tr -d '[:space:]') | |
VERSION=$(echo "$TEMP_DATA" | grep -o -P '(?<=\"torbrowserbundlelinux64\":\").*?(?=\"}\<\/span\>)') | |
# anoter example | |
# echo "$TEMP_DATA" | grep -o -P '(?<=Version).*?(?=\-Linux\(64\-Bit\))' | tail -c 6 | |
echo $VERSION |
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 | |
# for removing proxy use: gsettings set org.gnome.system.proxy mode 'none' | |
TEMP_PROXY_DATA=$(wget https://free-proxy-list.net/ -q -O - | tr -d '[:space:]') | |
TABLE=$(echo "$TEMP_PROXY_DATA" | grep -o -P '(?<=\<tr\>).*?(?=\<\/tr\>)') | |
strADRRESES=$(echo "$TABLE" | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}') | |
arrADDRESES=(${strADRRESES// / }) |
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
/* | |
Example of usage | |
let logger = new Logger('test',{ style : STYLES.RUBY_TEXT_WHITE_BACKGROUND}); | |
logger.log("test"); | |
Better setup console to dark theme and use styles with light background | |
*/ | |
'use strict'; |
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
/* | |
Use DEBUG variable for manage the display of logs | |
Define variables before init the manager and with 'var' statement | |
Example of usage: | |
var logger = new Logger('test',{ style : STYLES.RUBY_TEXT_WHITE_BACKGROUND, group : 'Test'}); | |
var logger2 = new Logger('test2',{ style : STYLES.RUBY_TEXT_WHITE_BACKGROUND, group : 'Test2'}); | |
... | |
let logManager = new LogManager(); |
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 | |
read -e -p $'\e[32mEnter work dir:\e[0m ' CODE_WORK_DIR | |
sudo docker run -t -p 127.0.0.1:8443:8443 -v "$CODE_WORK_DIR:/root/project" codercom/code-server --allow-http --no-auth |
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 | |
# Copy to /usr/bin and don't forget to make the script executable | |
# Usage: fsend filenameORpath (or empty for current directory) | |
FILE=$1 | |
read -e -p $'\e[32mEnter downloads count (1 by default):\e[0m ' DOWNLOADS_COUNT | |
read -e -p $'\e[32mRequire password (NO by default):\e[0m ' PASSWORD_REQUIRE |
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
from scapy.all import sniff, ARP | |
import sys | |
arp_table = {} | |
def watch_arp(packet): | |
if packet[ARP].op == 2: | |
if arp_table.get(packet[ARP].psrc) == None: | |
print ("Register new device %s:%s"%(packet[ARP].hwsrc,packet[ARP].psrc)) | |
arp_table[packet[ARP].psrc] = packet[ARP].hwsrc |
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 | |
# Copy to /usr/bin and don't forget to make the script executable | |
# Usage: setjv8 | |
sudo update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java | |
JAVA_HOME_LOCAL="/usr/lib/jvm/java-8-openjdk-amd64/jre" | |
sudo sed -i '/^JAVA_HOME/d' /etc/environment | |
echo "JAVA_HOME=${JAVA_HOME_LOCAL}" | sudo tee -a /etc/environment > /dev/null | |
. /etc/environment |
OlderNewer