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 | |
if [ $# -ne 2 ]; then | |
echo "Se requieren 2 parametros: {string} {directorio}" | |
exit 2 | |
fi | |
peso=$(ls -l $2 | grep "$1" | awk -F' ' '{sum+=$5;} END{print sum;}') | |
cant=$(ls -l | tail -n +2 | grep -c t) | |
ext=$(ls -l | grep $1 | awk -F"." '{ print $2 }' | sort | uniq -c | sort | tail -1) | |
echo "Cantidad de archivos encontrados: $cant" | |
echo "Peso total de los archivos: $peso" |
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 paho.mqtt.client as mqtt | |
import paho.mqtt.publish as publish | |
import time | |
import datetime | |
import json | |
import ast | |
import requests | |
import Queue | |
import sys | |
import base64 |
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 ast import literal_eval | |
import numpy as np | |
from matplotlib import pyplot as plt | |
data_file = open("CohVec.txt", "r") | |
data = data_file.read() | |
list_data1 = data.replace("{","[") | |
list_data2 = list_data1.replace("}","]") |
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
//Star Wars Imperial March - | |
//Simple 2 pin Buzzer Arduino - Source: https://goo.gl/eH33Vh - Arduino Tone: https://goo.gl/ptlXDj - | |
// NB: ALL NOTES DEFINED WITH STANDARD ENGLISH NAMES, EXCEPT FROM "A" | |
//THAT IS CALLED WITH THE ITALIAN NAME "LA" BECAUSE A0,A1...ARE THE ANALOG PINS ON ARDUINO. | |
// (Ab IS CALLED Ab AND NOT LAb) | |
#define C0 16.35 | |
#define Db0 17.32 | |
#define D0 18.35 | |
#define Eb0 19.45 |
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
mfruba's solution worked for me and my TP-Link TL-WN722N v2 (Realtek) in Kali. Here's how I used it: | |
I've downloaded all the code in a zip file from mfruba's repository: https://github.com/mfruba/kernel/archive/master.zip | |
> unzip ~\master.zip | |
> cd ~/master/drivers/TL-WN722N_v2.0-Ralink/rtl8188EUS_linux_v4.3.0.8_13968.20150417 | |
> make |
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
class Alumno: | |
def __init__(self, nombre, apellido, dni, materias, becado = False): | |
self.nombre = nombre | |
self.apellido = apellido | |
self.dni = dni | |
self.materias = materias | |
self.becado = becado | |
def mejorCursada(self): |
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
class Cliente(): | |
def __init__(self, nombre, apellido): | |
self.nombre = nombre | |
self.apellido = apellido | |
class Producto(): | |
def __init__(self, nombre, precio, id): | |
self.nombre = nombre | |
self.precio = precio |
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 | |
top -b -c -p $(pgrep -d',' -f nessusd) > top.dat & | |
while : | |
do | |
for i in {1..50} : | |
do | |
cat top.dat | grep nessusd | cut -c 50-53 > nessus_cpu.txt | |
sleep 5 | |
data=$(awk '/./{line=$0} END{print line}' nessus_cpu.txt) |
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 time | |
import random | |
import paho.mqtt.client as mqtt | |
# The callback for when the client receives a CONNACK response from the server. | |
def on_connect(client, userdata, flags, rc): | |
print("Connected with result code "+str(rc)) | |
# Subscribing in on_connect() means that if we lose the connection and | |
# reconnect then subscriptions will be renewed. |
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 false | |
use_bpm 130 | |
fadein = (ramp *range(0 ,2, 0.01)) | |
live_loop :kick do | |
if (spread 1, 4).tick then | |
sample :bd_tek, amp: fadein.look, cutoff: 80 | |
end | |
sleep 0.25 |
NewerOlder