Skip to content

Instantly share code, notes, and snippets.

Sebastián Seba ssebastianj

Block or report user

Report or block ssebastianj

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
@ssebastianj
ssebastianj / healthcheck.sh
Last active May 1, 2019
Run ping, netcat, host (or any other) commands on multiple hosts or IPs or both. Also run many procresses at a time!
View healthcheck.sh
#!/usr/bin/env bash
set -euo pipefail
# In some commands, I've used the full parameter names just for the sake of learning/debugging/memorizing.
# From $ man xargs:
# --max-procs
# Run up to max-procs processes at a time; the default is 1.
# If max-procs is 0, xargs will run as many processes as possible at a time.
View commands.txt
ls config 2>/dev/null # Answer <y> to run proposed fix | <ENTER> to skip proposed fix | <Ctrl+C> to exit
ls -la config 2>/dev/null # <Ctrl+C> if the issue was resolved | Answer <y> to try current fix | <ENTER> to skip current fix
ls -lAh config 2>/dev/null # <Ctrl+C> if the issue was resolved | Answer <y> to try current fix | <ENTER> to skip current fix
tree -L 1 config 2>/dev/null # <Ctrl+C> if the issue was resolved | Answer <y> to try current fix | <ENTER> to skip current fix
echo 'End' # No more fixes to try. If the issue was not resolved please open an issue on https://github.com/project/issues / <ENTER> to exit
View keybase.md

Keybase proof

I hereby claim:

  • I am ssebastianj on github.
  • I am ssebastianj (https://keybase.io/ssebastianj) on keybase.
  • I have a public key ASC7BXPCzGfmo8t5OcSvcUOcipYzGVE-pmpw3mxnA7aX1go

To claim this, I am signing this object:

View docstring_factory.py
def docstring_factory(value, docstring):
'''Overrides the value's docstring (if any).'''
type_name = value.__class__.__name__
type_bases = (type(value),)
type_dict = {'__doc__': docstring}
return type(type_name, type_bases, type_dict)(value)
View types.markdown

Types

A type is a collection of possible values. An integer can have values 0, 1, 2, 3, etc.; a boolean can have values true and false. We can imagine any type we like: for example, a HighFive type that allows the values "hi" or 5, but nothing else. It's not a string and it's not an integer; it's its own, separate type.

Statically typed languages constrain variables' types: the programming language might know, for example, that x is an Integer. In that case, the programmer isn't allowed to say x = true; that would be an invalid program. The compiler will refuse to compile it, so we can't even run it.

View find_packages_console_scripts.py
python -c "import pip, pprint; pprint.pprint([pkg.get_entry_map().get('console_scripts', '') for pkg in pip.get_installed_distributions()])"
View bindkey.md
Shortcut Action
CTRL+@ set-mark-command
CTRL+A beginning-of-line
CTRL+B backward-char
CTRL+D delete-char-or-list
CTRL+E end-of-line
CTRL+F forward-char
CTRL+G send-break
CTRL+H backward-delete-char
View owasp-top-10-proactive-controls-2016-summary.md

OWASP Top 10 Proactive Controls 2016

Ordered by order of importance, with control number 1 being the most important.

  1. Verify for security early and often.
  2. Parameterize queries.
  3. Encode data.
  4. Validate all inputs.
  5. Implement identity and authentication controls.
  6. Implemente appropiate access controls.
@ssebastianj
ssebastianj / Windows10-Setup.ps1
Created Jul 1, 2016 — forked from NickCraver/Windows10-Setup.ps1
(In Progress) PowerShell Script I use to customize my machines in the same way for privacy, search, UI, etc.
View Windows10-Setup.ps1
##################
# Privacy Settings
##################
# Privacy: Let apps use my advertising ID: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0
# To Restore:
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1
# Privacy: SmartScreen Filter for Store Apps: Disable
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0
View pypi_cdn_dns_servers.md

Setup

Servidores DNS de Google IP
Primario 8.8.8.8
Secundario 8.8.4.4
Servidores DNS de Arnet IP
Primario 200.45.191.35
You can’t perform that action at this time.