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
| /^:?((?<nick>\S+)!(?<user>\S+)@)?(?<server>\S+)\s(?<cmd>\S+)\s((?<target>\S+)\s)?((?<target2>\S+)\s)?((:(?<payload>.+))|(?<params>.*))$/ |
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
| 23.21.150.121:3478 | |
| iphone-stun.strato-iphone.de:3478 | |
| numb.viagenie.ca:3478 | |
| s1.taraba.net:3478 | |
| s2.taraba.net:3478 | |
| stun.12connect.com:3478 | |
| stun.12voip.com:3478 | |
| stun.1und1.de:3478 | |
| stun.2talk.co.nz:3478 | |
| stun.2talk.com:3478 |
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
| /* | |
| TODO | |
| ---- | |
| - | |
| */ |
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 ruby | |
| require "redis" | |
| redis = Redis.new | |
| redis.keys("*").each do |key| | |
| val = case redis.type(key) | |
| when "string" | |
| redis.get key | |
| when "list" |
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
| # Ways to execute a shell script in Ruby | |
| # Example Script - Joseph Pecoraro | |
| cmd = "echo 'hi'" # Sample string that can be used | |
| # 1. Kernel#` - commonly called backticks - `cmd` | |
| # This is like many other languages, including bash, PHP, and Perl | |
| # Returns the result of the shell command | |
| # Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111 |
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 | |
| # | |
| # Example of how to parse short/long options with 'getopt' | |
| # | |
| OPTS=`getopt -o vhns: --long verbose,dry-run,help,stack-size: -n 'parse-options' -- "$@"` | |
| if [ $? != 0 ] ; then echo "Failed parsing options." >&2 ; exit 1 ; fi | |
| echo "$OPTS" |
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
| #include <stdio.h> | |
| #include <string.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| #include <fcntl.h> | |
| #include <netinet/tcp.h> | |
| #include <sys/socket.h> | |
| #include <sys/types.h> | |
| #include <netinet/in.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
| 1. Install Ruby | |
| pkg_add ruby | |
| - I chose 2.3.0 | |
| 2. Install gems | |
| pkg_add ruby-gems | |
| 3. Add ~/.gem/ruby/2.3/bin to PATH | |
| PATH="~/.gem/ruby/2.3/bin:"$PATH | |
| 4. Install bundle | |
| gem23 install --user-install bundler | |
| 5. Install nokogiri (or run into problems installing rails) |
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/sh | |
| # find_network.sh - An OpenBSD Wireless Network configurator | |
| # Looks for available networks listed at the end of the script | |
| # Use this by adding "!/path/to/find_network.sh \$if" to your wlan hostname.if | |
| if=$1 | |
| if [ -z "$if" ]; then | |
| echo "Usage: $0 interface" >&2 | |
| exit 2; | |
| fi |
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
| /* | |
| * Sample file using the Linux kernel coding convention. | |
| * | |
| * https://www.kernel.org/doc/Documentation/CodingStyle | |
| * | |
| * General rules: | |
| * - Indents are tabs and must be 8 spaces wide. | |
| * - Each line must be at most 80 characters long. | |
| * - Use C-style comments. | |
| * - File names should be lower-case.c |