Skip to content

Instantly share code, notes, and snippets.

View jeffdrumgod's full-sized avatar

Jefferson Rafael Kozerski jeffdrumgod

View GitHub Profile
@jeffdrumgod
jeffdrumgod / http-benchmark.md
Created April 28, 2023 02:18 — forked from denji/http-benchmark.md
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@jeffdrumgod
jeffdrumgod / russia-ddos.md
Created March 2, 2022 21:44 — forked from sergeyzenchenko/russia-ddos.md
Russia DDOS list
@jeffdrumgod
jeffdrumgod / http_request.php
Created October 16, 2021 17:48 — forked from afair/http_request.php
PHP Function to make a remote HTTP request (POST, Authentication, API, Files, etc.) and returns the response
<?php
/**
* Makes a remote HTTP request and returns the response.
*
* @author Allen Fair <allen.fair@gmail.com>
* @copyright 2018 Allen Fair
* @license https://opensource.org/licenses/MIT MIT
*
* @param string $url The full URL endpoint: "https://example.com/endpoint"
* @param array $opt An Associative Array of extended request options
@jeffdrumgod
jeffdrumgod / ramos_de_atividade.txt
Created May 17, 2019 05:47 — forked from prodis/ramos_de_atividade.txt
Lista de ramos de atividade
Alimentos e Bebidas
Arte e Antiguidades
Artigos Religiosos
Assinaturas e Revistas
Automóveis e Veículos
Bebês e Cia
Blu-Ray
Brindes / Materiais Promocionais
Brinquedos e Games
Casa e Decoração
@jeffdrumgod
jeffdrumgod / do_cloud-config.init.yaml
Created March 4, 2019 15:20 — forked from c0psrul3/do_cloud-config.init.yaml
Digital Ocean cloud-init / cloud-config / droplet metadata usage
#
#DO droplet metadata intro + for DO-API
# [https://www.digitalocean.com/community/tutorials/an-introduction-to-droplet-metadata#how-to-retrieve-droplet-metadata#digitalocean-api]
#
#intro to cloud-config scripting (source of following examples)
# [https://www.digitalocean.com/community/tutorials/an-introduction-to-cloud-config-scripting]
#
#howto
# [https://www.digitalocean.com/community/tutorials/how-to-use-cloud-config-for-your-initial-server-setup]
#
@jeffdrumgod
jeffdrumgod / coreos-virtualbox.md
Created February 21, 2019 20:03 — forked from noonat/coreos-virtualbox.md
Installing CoreOS on VirtualBox
  • Download and install VirtualBox.
  • Download the CoreOS ISO
  • Create a new VM in VirtualBox
    • For the OS, Other Linux, 64-bit should be fine
    • Give the VM 1gb of memory, like your physical hardware has.
    • Create a disk of whatever size you want. I made a VMDK file that could expand dynamically up to 8gb.
  • Mount the ISO in the VM
    • Right click on the VM and click settings
  • Go to the storage tab
@jeffdrumgod
jeffdrumgod / gist:bae0190dafb37d0cfed1fe183c6063cc
Created February 21, 2019 15:59 — forked from rmondello/gist:b933231b1fcc83a7db0b
Exporting (iCloud) Keychain and Safari credentials to a CSV file

Exporting (iCloud) Keychain and Safari credentials to a CSV file

After my dad died, I wanted to be able to have access any of his online accounts going forward. My dad was a Safari user and used iCloud Keychain to sync his credentials across his devices. I don’t want to have to keep an OS X user account around just to access his accounts, so I wanted to export his credentials to a portable file.

This is the process I used to create a CSV file of his credentials in the format “example.com,user,pass”. This portable format would be pretty easy to import into 1Password or Safari in the future.

The way I went about this isn’t great; it opens up more opportunities for apps to control one’s Mac through Accessibility APIs, it writes plaintext passwords to disk, and it could use some cleaning up. A better approach might leverage the security command line tool that ships with OS X. That said, I found this method to be a fun illustration of what’s possible us

@jeffdrumgod
jeffdrumgod / nginx.conf
Created December 12, 2018 21:23 — forked from jrom/nginx.conf
nginx hack for multiple conditions
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";
@jeffdrumgod
jeffdrumgod / alarm_clock_spotify.scpt
Created December 9, 2018 13:40 — forked from ngopal/alarm_clock_spotify.scpt
Setup your mac to use Spotify as your alarm clock
# In order to use this script, you must replace 'YOURUSERNAMEHERE' with your Spotify username.
# Execute this script like so: 'osascript alarm_clock_spotify.scpt' (without single-quotes obviously)
# Full explanation here: http://www.nikhilgopal.com/2011/08/show-and-tell-applescript-spotify-alarm.html
# If you would like to specify a playlist, please refer to this gist: https://gist.github.com/3344118
set volume 2
open location "spotify:user:YOURUSERNAMEHERE:playlist:muzic"
tell application "Spotify"
set the sound volume to 0
play
@jeffdrumgod
jeffdrumgod / .htaccess
Created August 14, 2018 13:45 — forked from voku/gist:d958041e7b1c19356e721de1eda1e6f8
.htaccess with many options + description
# Apache Server Configs v2.14 | MIT License
# https://github.com/h5bp/server-configs-apache
# (!) Using `.htaccess` files slows down Apache, therefore, if you have
# access to the main server configuration file (which is usually called
# `httpd.conf`), you should add this logic there.
#
# https://httpd.apache.org/docs/current/howto/htaccess.html.
# ----------------------------------------------------------------------