diskutil list
/dev/disk2
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *32.0 GB disk2
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
var exec = require('child_process').exec | |
var url = 'https://URL' | |
var command = | |
'curl --silent ' + url + '| ffprobe pipe:0 -print_format json -show_format' | |
exec(command, function callback (error, stdout, stderr) { | |
if (stderr.indexOf('Invalid data') > -1) { | |
console.error('Error!') | |
} |
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
arp-scan 192.168.2.0/24 | grep 2c:be:08:8a:83:1b |
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
time mysqldump -uroot -p --skip-set-charset --default-character-set=latin1 -h HOST TABLE | sed 's/CHARSET=latin1/CHARSET=utf8/g' > dump.sql | |
time mysql -uroot -p --default-character-set=utf8 -h HOST TABLE < dump.sql |
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 | |
# No-IP uses emails as passwords, so make sure that you encode the @ as %40 | |
USERNAME=username | |
PASSWORD=password | |
HOST=hostsite | |
LOGFILE=logdir/noip.log | |
STOREDIPFILE=configdir/current_ip | |
USERAGENT="Simple Bash No-IP Updater/0.4" |
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
# print the numbers 1 to 5 | |
(1..5).each do |page| | |
puts page | |
end | |
# print a url string with a page number inside | |
(1..5).each do |page| | |
puts "http://blog/scripted.com/page/#{page}" | |
end |
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
#Create dummy data | |
DIR=staging/recordings/XXXXXX | |
FOLDER=dumy_data | |
mkdir $FOLDER | |
cd $FOLDER; | |
mkdir -p $DIR; | |
for i in {1..100}; do dd if=/dev/urandom bs=1 count=1 of=$DIR/dummy-file$i.mp3; done |
I hereby claim:
- I am diogopms on github.
- I am diogopms (https://keybase.io/diogopms) on keybase.
- I have a public key ASAh5N9Y0ecR14kGGaWqzSQpirO3V_xPotADngLlVszrMwo
To claim this, I am signing this object:
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 <Arduino.h> | |
#include <WiFi.h> | |
void setup() | |
{ | |
Serial.begin(9600); | |
delay(10); | |
Serial.print("Connecting"); |
OlderNewer