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
#!/bin/bash | |
volume="/Volumes/CANON_DC" | |
# disable indexing | |
sudo mdutil -v -i off ${volume} | |
# remove index | |
sudo mdutil -v -X ${volume} |
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
function sshi --description 'new ssh peer' --argument ip | |
if test -n "$ip" | |
set v6can (ipv6calc -q $ip) | |
echo removing IP $ip and $v6can from known_hosts and sending my keys | |
set_color green | |
and ssh-keygen -R $ip | |
and ssh-keygen -R $v6can | |
and set_color normal | |
and ssh-copy-id root@$ip | |
else |
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
function update-all | |
brew update | |
brew upgrade | |
gem update | |
omf update | |
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
Final goal: http://breaking-the-system.blogspot.cz/2014/08/emulating-usb-devices-in-python-with-no.html | |
Newer version: https://github.com/lcgamboa/USBIP-Virtual-USB-Device | |
------ | |
server: | |
# lsb_release -a | |
LSB Version: core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch | |
Distributor ID: openSUSE Leap |
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
#!/usr/bin/env bash | |
# Formatting constants | |
export BOLD=`tput bold` | |
export UNDERLINE_ON=`tput smul` | |
export UNDERLINE_OFF=`tput rmul` | |
export TEXT_BLACK=`tput setaf 0` | |
export TEXT_RED=`tput setaf 1` | |
export TEXT_GREEN=`tput setaf 2` | |
export TEXT_YELLOW=`tput setaf 3` |
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
#!/bin/bash | |
# | |
############################################################################### | |
# Script used for setting bandwidth and delay. # | |
############################################################################### | |
# | |
# bandwidth in kilobytes | |
BANDWIDTH="640" | |
# time to reach other server (RTT will be 2xlonger=40ms) |
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
#!/bin/bash -eu | |
tag=$(dirname $(readlink -f $0))/$(basename $0) | |
# redirects output to logger, -s print it to stderr as well, -t add script name as a tag | |
# http://stackoverflow.com/questions/3173131/redirect-copy-of-stdout-to-log-file-from-within-bash-script-itself | |
exec > >( logger -s -t "${tag} [INFO ]" ) | |
# trap handler: print last error - filename, line, return code to stderr | |
function error-trap-handler() | |
{ |
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 javax.sound.sampled.*; | |
import java.util.Arrays; | |
public class AudioSystemInfo { | |
public static void main(String[] args) { | |
System.out.println("Audio devices as seen by javax.sound:"); | |
// simpleMixerInfo(); |