This file contains 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
auto lo | |
iface lo inet loopback | |
iface eth0 inet dhcp | |
auto wlan0 | |
allow-hotplug wlan0 | |
iface wlan0 inet manual | |
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf | |
iface default inet dhcp |
This file contains 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
############################ | |
# Push notifications script | |
############################ | |
read -d '' String <<"EOF" | |
require "net/https" | |
require "socket" | |
url = URI.parse("https://api.pushover.net/1/messages.json") | |
req = Net::HTTP::Post.new(url.path) |
This file contains 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
/* Problem: Find # of occurrences of a substring in a given input string | |
Example Output: | |
Test string: abcdabceabcfabcabcd | |
Substring count for abc:5 | |
Substring count for abcd:2 | |
*/ | |
public class CountSubs { | |
public static void main(String[] args) { | |
String testString = "abcdabceabcfabcabcd"; |
NewerOlder