Skip to content

Instantly share code, notes, and snippets.

View fboaventura's full-sized avatar
📚
Always learning

Frederico Freire Boaventura fboaventura

📚
Always learning
View GitHub Profile
@pklaus
pklaus / ping.py
Created March 5, 2011 09:50
A pure python ping implementation using raw socket.
#!/usr/bin/env python2
"""
Other Repositories of python-ping
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* https://github.com/l4m3rx/python-ping supports Python2 and Python3
* https://bitbucket.org/delroth/python-ping
@carmaa
carmaa / py3whois.py
Created September 9, 2012 17:46
Python 3 whois client
"""
Whois client for python
transliteration of:
http://www.opensource.apple.com/source/adv_cmds/adv_cmds-138.1/whois/whois.c
Copyright (c) 2010 Chris Wolf
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
@BFTrick
BFTrick / .htaccess
Created September 12, 2012 13:39
Default WordPress .htaccess File
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
@UtahDave
UtahDave / saltsample_09252012_01
Created September 26, 2012 02:54 — forked from l2ol33rt/saltsample_09252012_01
Saltstack sample of using states and pillars for users
Here is a sample of how I am currently dealing with users.
Big thanks to uggedal! I used his user states as an example: https://github.com/uggedal/states
###
# How to create password hashes
###
python -c "import crypt; print crypt.crypt('password', '\$6\$SALTsalt\$')"
###
@pklaus
pklaus / dnsupdate.py
Last active November 14, 2023 23:50
dnsupdate is meant to replace nsupdate, the standard DDNS update tool created by BIND authors ISC. While nsupdate does the job it is awkward to wrap in scripts and its usage in general is just not very intuitive. dnsupdate is meant to work well from the command line or from scripts and easy to use. It also does some nice things like automaticall…
#!/usr/bin/env python2.7
# Matt's DNS management tool
# Manage DNS using DDNS features
#
# See http://planetfoo.org/blog/archive/2012/01/24/a-better-nsupdate/
#
# Usage: dnsupdate -s server -k key -t ttl add _minecraft._tcp.mc.example.com SRV 0 0 25566 mc.example.com.
# -h HELP!
# -s the server
# -k the key
@willurd
willurd / web-servers.md
Last active June 26, 2024 11:15
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@erkobridee
erkobridee / medicina_software_livre.md
Last active June 24, 2024 04:28
listagem de ferramentas de software livre para profissionais de medicina

Profissionais Liberais - Medicina

Ferramentas

Modelo Comercial : Software Livre

OpenMRS

Descrição : É uma plataforma que permite a construção de um sistema personalizado de registros médicos sem precisar de conhecimentos em programação (claro que o conhecimento de análises médicas e sistemas é necessário). O sistema é baseado em uma estrutura conceitual de banco de dados que armazena dados do paciente e registros médicos, permite a exportação de dados para planilhas, possui meios de segurança para os dados clínicos dos pacientes, criação de relatórios, e outras funções. É um projeto libre muito utilizado nos países pobres para o acompanhamento de epidemias e está disponível para Linux, Windows e Mac OS.

@techgaun
techgaun / sysctl.conf
Created February 24, 2015 13:36
Sysctl configuration for high performance
### KERNEL TUNING ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
@Tblue
Tblue / mozlz4a.py
Last active April 28, 2024 12:02
MozLz4a compression/decompression utility
#!/usr/bin/env python3
# vim: sw=4 ts=4 et tw=100 cc=+1
#
####################################################################################################
# DESCRIPTION #
####################################################################################################
#
# Decompressor/compressor for files in Mozilla's "mozLz4" format. Firefox uses this file format to
# compress e. g. bookmark backups (*.jsonlz4).
#
@olih
olih / jq-cheetsheet.md
Last active June 22, 2024 18:30
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq