- have fun with them
- projections
- filters
- resource-keys
- scripting-gcloud
- gcloud alpha interactive
- https://medium.com/@Joachim8675309/getting-started-with-gcloud-sdk-part-1-114924737
- https://medium.com/@Joachim8675309/getting-started-with-gcloud-sdk-part-2-4d049a656f1a
- https://gist.github.com/bborysenko/97749fe0514b819a5a87611e6aea3db8
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
#!/usr/bin/env bash | |
# how_wifi_clients.sh | |
# Shows MAC, IP address and any hostname info for all connected wifi devices | |
# written for openwrt 12.09 Attitude Adjustment | |
# modified by romano@rgtti.com from http://wiki.openwrt.org/doc/faq/faq.wireless#how.to.get.a.list.of.connected.clients | |
function mon () { | |
echo "# All connected wifi devices, with IP address," |
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
#!/usr/bin/env bash | |
set -e # Quit on first error | |
count=0 | |
for i in ./*/* | |
do | |
my_array["$count"]="$i" # Creates an array with the filenames | |
((++count)) # Increase the array index | |
echo ${my_array[@]} # Echo the contents of the array | |
done |
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
[ | |
{ | |
"metadata": { | |
"id": "850c6bb1-4a81-4f83-a81f-835d651a211c", | |
"publisherId": "Mikael.Angular-BeastCode", | |
"publisherDisplayName": "Mikael" | |
}, | |
"name": "Angular-BeastCode", | |
"publisher": "Mikael", | |
"version": "8.0.7" |
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
# The following example shows a way to use iptables for basic round-robin load balancing, by redirecting | |
# packets two one of three ports based on a statistic counter. | |
# | |
# TCP packets for new sessions arriving on port 9000 will rotate between ports 9001, 9002 and 9003, where | |
# three identical copies of some application are expected to be listening. | |
# | |
# Packets that aren't TCP or that related to an already-established connection are left untouched, letting | |
# the standard iptables connection tracking machinery send it to the appropriate port. | |
# | |
# For this to work well, connections need to be relatively short. Ideally there would be an extra layer |
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
Java Paramter Type Names | |
E – Element (used extensively by the Java Collections Framework, for example ArrayList, Set etc.) | |
K – Key (Used in Map) | |
N – Number | |
T – Type | |
V – Value (Used in Map) | |
S,U,V etc. – 2nd, 3rd, 4th types | |
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
public class Person { | |
private final Object key = new Object(); | |
public String init() { | |
synchronized(key) { | |
// Do stuff | |
} | |
} | |
} |
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
DELIMITER // | |
DROP PROCEDURE IF EXISTS addnewemployee // | |
CREATE PROCEDURE addnewemployee | |
( | |
IN eno int(11), | |
IN ebdate date, | |
IN efname varchar(14), | |
IN elname varchar(16), | |
IN egender enum('M', 'F'), | |
IN ehdate date |
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
CallableStatement cstmt = conn.prepareCall( | |
"{call StoredProcedureName ( [Parameter Definition] ) }" | |
) | |
Types of parameters allowed include: | |
1) Input(Default) | |
2) Output | |
3) Input Output | |
To Set the Parameters we use: |
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
// create a java calendar instance | |
Calendar calendar = Calendar.getInstance(); | |
// get a java date (java.util.Date) from the Calendar instance. | |
// this java date will represent the current date, or "now". | |
java.util.Date currentDate = calendar.getTime(); | |
// now, create a java.sql.Date from the java.util.Date | |
java.sql.Date date = new java.sql.Date(currentDate.getTime()); |