The more you know: multiple find replace expressions in one sed command
Mar 13, 2014Its easy just follow the beat: sed ’s/Find/Replace/;s/Find/Replace/’ ^I use that one a lot for when I am piping something to sed. It’s epic. More here!
Its easy just follow the beat: sed ’s/Find/Replace/;s/Find/Replace/’ ^I use that one a lot for when I am piping something to sed. It’s epic. More here!
73387# ^Looks something like that. The actual data are the numbers, with the ‘#’ added (with inverse coloring b/w fg and bg colors) and my shell newlined. This is an intended zsh feature, not a problem. PROMPT_SP Attempt to preserve a partial line (i.e. a line that did not end with a newline) that would otherwise be covered up by the command prompt due to the PROMPT_CR option. This works by outputting some cursor-control characters, including a series of spaces, that should make the terminal wrap to the next line when a partial line is present (note that this is only successful if your terminal has automatic margins, which is typical).
Continue reading ↦wasdkeyboards.com is an epic site with awesome stuff. And one thing I love the most is having customization options at my disposal. Tell me which one of these you like! #1: #2: #3: #4:
The following guide explains a method for converting a Digital Ocean Droplet to a VMDK which can be used under VMware ESXi Hypervisor or other virtualization software. This process is one way. It is currently impossible to convert a VMDK to a Digital Ocean Droplet. View it here (pdf)!
So I had the normal irssi config stuff all defined and all setup from my non-bouncer days. So I figured, with the bouncer, it shouldn’t be hard to get changed over etc.. Here is what I had pre-bouncer: servers= { { address = “server.com”; chatnet = “derp”; port = “1820”; use_ssl = “yes”; ssl_verify = “no”; autoconnect = “Yes”; }, ); chatnets = { derp = { type = “IRC”; nick = “username”; };
Continue reading ↦What this does is allow you to easily work with iptables without the fear of ever being locked out of a remote box. Trust me, when it happens, you’ll wish you had something like this. All you really would need to change to use this yourself is the FLUSH_WAIT timer and maybe some of the print’s. Otherwise, this should work across pretty much all systems. Read the comments to learn more about what this does.
Continue reading ↦hping is nice for sending a bunch of traffic just to test certain reactions of remote machines etc.. Here are some cool ways to use it and some useful links on more info. Start a flood of icmp packets with a rand src: hping 16.0.24.2 –rand-source –flood –icmp -V Do 500pps with just one src: hping 16.0.24.2 -i u2000 –icmp -V Here, we use the -i u2000 which tells hping to send a packet every 2000us which is 500 packets per second.
Continue reading ↦Want all traffic destined for 16.0.24.0/24 to go through your interface with ip 192.168.192.7? route add -net 16.0.24.0 netmask 255.255.255.0 gw 192.168.192.7 To delete this route, route del -net 16.0.24.0/24 Ohh and static arp to one of the hosts in that network? arp -s 16.0.24.2 00:50:49:A0:9E:E0 It’s so easy! More info here and here.
http://misc.flogisoft.com/bash/tip_colors_and_formatting Also, see this archlinux wiki page. ^An extremely reliable and helpful source! Note if doing echo’s, be sure to do an echo -e “stuff” instead of just echo “stuff”. In zsh (maybe bash too), I like to do the following for prompts: (gold asking text, cyan (underlined) link, newline and white ‘>’ character waiting for user input) print -nP “\e[0;33mAre you sure you want to do this?, y|n? If not, go here:\e[0m \e[4;36mhttps://randonplace.
Continue reading ↦So we needed to proxy our plex server through another box. That part was easy enough with a nice little ncat socket running on the proxy: ncat -k -l 32400 –sh-exec “ncat server.com 32400” Now we can access through the proxy address proxy.com:32400/web which is great and all. However, to get our devices/plexweb to use the new address, some kung fu’ery is needed. Basically, your PMS install goes out and uses plex servers to figure out its external ip address.
Continue reading ↦