Skip to content

Instantly share code, notes, and snippets.

@DaniloNC
DaniloNC / wls.sed
Last active August 29, 2015 14:02
Sed script to remove Weblogic logs that match some patterns.
### Sed script to remove Weblogic logs that match some patterns.
### Usage sed -nf THIS_SCRIPT LOG_FILE
### Danilo Clemente - http://twitter.com/DaniloNC
/^####/ {
1! b check_match
}
H
b
@DaniloNC
DaniloNC / google_dns.sh
Created October 23, 2014 19:55
set dnsmasq dns servers via dbus
#!/bin/bash
## Quick and Dirty hack to change dnsmasq dns servers
sudo mdbus2 -s org.freedesktop.NetworkManager.dnsmasq /uk/org/thekelleys/dnsmasq org.freedesktop.NetworkManager.dnsmasq.SetDomainServers ['8.8.8.8','8.8.4.4']
@DaniloNC
DaniloNC / setBright.sh
Created November 1, 2014 13:43
Hack to work around the ubuntu 14.04 brightness issue with dell (tested on Inspiron N4010)
#!/bin/bash
setBright() {
echo $1 | sudo tee -a /sys/devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/brightness
}
if [ $# -gt 0 ]
then
setBright $1
else
@DaniloNC
DaniloNC / keybase.md
Created November 4, 2014 20:40
keybase.md

Keybase proof

I hereby claim:

  • I am danilonc on github.
  • I am danilonc (https://keybase.io/danilonc) on keybase.
  • I have a public key whose fingerprint is 0CF2 5E4D 32FA 8A40 3202 4810 E4AC 80B7 184F CA19

To claim this, I am signing this object:

@DaniloNC
DaniloNC / DigitalOcean.txt
Created August 12, 2015 13:23
Digital Ocean free 10 Promo code
https://www.digitalocean.com/?refcode=3a5180b12e31
10 usd free digital ocean promo code
@DaniloNC
DaniloNC / danilonc.plugin.zsh
Last active October 10, 2015 12:15
zsh danilonc's plugin
ccurl () {
curl -A 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)' $@ | pygmentize
}
alias vssh='vagrant ssh'
alias vup='vagrant up'
@DaniloNC
DaniloNC / gist:f1ce3825e3c260a54acb
Created October 2, 2015 01:42
OS X El Capitan InstallESD.dmg sha1sum
5e21097f2e98417ecc12574a7bb46a402594ea4a /Applications/Install OS X El Capitan.app/Contents/SharedSupport/InstallESD.dmg

Nvidia GTX 1080 Hashcat Benchmarks

Product: Sagitta Invictus (PN S2440X-GTX-1080)

Software: Hashcat 3.00-beta-116-g9a54829, Nvidia driver 367.18

Accelerator: 1x Nvidia GTX 1080 Founders Edition

Highlights

@DaniloNC
DaniloNC / gist:03423600518734e2e42146c8ce76bedd
Created July 26, 2017 01:55
xmllint one line to get the original hostname on nmap scan
xmllint --xpath '//host[//port[@portid=80]/state[@state="open"]]/hostnames/hostname[@type="user"]/@name' nmap_result.xml
@DaniloNC
DaniloNC / restic-windows-vss.ps1
Created April 11, 2018 16:22 — forked from rstanleyhum/restic-windows-vss.ps1
Restic Backup Windows Volume Shadow Copy Service script taken from https://github.com/restic/restic/issues/340
# Windows PowerShell Script to use restic to backup files using the Volume Shadow Copy Service, allowing
# that are in use to be backed up. The script must be run with elevated privileges.
# The Volume Shadow Copy Service must be enabled for the disk volume that contains the files to be backed up.
#
# Parameters
$resticExe = 'C:\Users\Username\go\bin\restic.exe'
$resticRepository = '\\SYNOLOGY212J\backups\restic-workstation'
$rootVolume = "C:\"
# List of folders to backup, separated by commas
$foldersToBackup = @(