Skip to content

Instantly share code, notes, and snippets.

Avatar
💻
Coding as usual.

d4 r c k h d4rckh

💻
Coding as usual.
View GitHub Profile
@d4rckh
d4rckh / ethstats.sh
Last active Nov 11, 2019
interface info linux
View ethstats.sh
interface="enp3s0"
echo "Interface: $interface"
mac=$(eval "ifconfig enp3s0 | grep 'ether' | awk '{ print \$2 }'")
RX=$(eval "ifconfig $interface | grep 'RX packets' | awk '{ print \$6 }' | cut -d \"(\" -f 2")
TX=$(eval "ifconfig $interface | grep 'TX packets' | awk '{ print \$6 }' | cut -d \"(\" -f 2")
echo "RX: $RX MB"
echo "TX: $TX MB"
echo "MAC Address: $mac"
@d4rckh
d4rckh / sketch.ino
Created Nov 16, 2019
Wireless Wifi
View sketch.ino
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
// Replace with your network credentials
const char* ssid = "not a free wifi";
const char* password = "pass";
ESP8266WebServer server(80); //instantiate server at port 80 (http port)
@d4rckh
d4rckh / catgrabber.js
Created Mar 2, 2020
Script to grab r/cats !
View catgrabber.js
const request = require('request')
const fs = require('fs')
const sr = 'cats'
var i = 0
var download = function(uri, filename, callback){
request.head(uri, function(err, res, body){
request(uri).pipe(fs.createWriteStream(filename)).on('close', callback);
View keybase.md

Keybase proof

I hereby claim:

  • I am d4rckh on github.
  • I am d4rckh (https://keybase.io/d4rckh) on keybase.
  • I have a public key ASBcHMyqpeN_Oq2cjCXk4dt5RUbLEZsp6c23gaBP-QOkkgo

To claim this, I am signing this object: