- httpss://bruno.foundation
- @brunogama
- in/brunogama
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
slnamepwd() { | |
mdfind -onlyin $PWD -name $* | |
SLNAMETOTAL=$(mdfind -count -onlyin $PWD -name $*) | |
printf "\nTotal files found ${SLNAMETOTAL}\n" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
typedef void (^VoidBlock)(); | |
@interface NSTimer (NSTimer_Additions) | |
+ (NSTimer *)scheduleTimerWithTimeInterval:(NSTimeInterval)theSeconds repeats:(BOOL)repeats actions:(VoidBlock)actions; | |
@end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo scutil --set HostName computer-name.local |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kill it Like a Boss | |
function vaporize { | |
QSTRING=$* | |
PROC=`ps aux | grep ${QSTRING} | grep -v grep | awk '{print $2}'` | |
if [ ! -n "$PROC" ]; then | |
echo "0 PID found with the matching String: \"${QSTRING}\"." | |
else | |
NUMPROC=`echo $PROC | awk '{print NF}'` | |
echo "Found $NUMPROC PIDs with the matching String: \"${QSTRING}\"." | |
sudo kill -9 $PROC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
updateMalwareDefinitions() { | |
sudo /usr/libexec/XProtectUpdater | |
echo "Last Malware Definitions $(defaults read /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/XProtect.meta LastModification)" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import string | |
from os import system as s | |
for i in range(14): | |
new = '%s.jpg' % (''.join(random.choice(string.ascii_lowercase + string.digits) for x in range(15))) | |
cmd = 'cp terra.jpg %s' % (new) | |
s(cmd) | |
s('dd if=/dev/urandom of=dummy_bytes bs=1m count=80') | |
cmd = 'cat dummy_bytes >> %s' % (new) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
runservervm() { | |
interface=$1 | |
if [ -n "$interface" ]; then | |
interface=$1 | |
else | |
interface='en1' | |
fi | |
internalIP=$(ipconfig getifaddr ${interface}) | |
echo "http://${internalIP}:8000" | pbcopy | |
python manage.py runserver ${internalIP}:8000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"auto_complete": true, | |
"auto_complete_commit_on_tab": false, | |
"auto_complete_delay": 50, | |
"auto_complete_selector": "source - comment", | |
"auto_complete_size_limit": 4194304, | |
"auto_complete_triggers": | |
[ | |
{ | |
"characters": "<", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// main.m | |
// Literals | |
// | |
// Created by Bruno Gama on 14/06/12. | |
// Copyright (c) 2012 Bruno Gama. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in *pdf; do x=$(echo $i | sed 's/pdf/epub/g'); [ -f $x ] && rm $i; done |
OlderNewer