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 | |
while [ true ] | |
do | |
sleep 15 | |
sensors | |
done |
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
Capitalized, short (50 chars or less) summary | |
More detailed explanatory text, if necessary. Wrap it to about 72 | |
characters or so. In some contexts, the first line is treated as the | |
subject of an email and the rest of the text as the body. The blank | |
line separating the summary from the body is critical (unless you omit | |
the body entirely); tools like rebase can get confused if you run the | |
two together. | |
Write your commit message in the imperative: "Fix bug" and not "Fixed bug" |
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
/** | |
* @author Kurt P | |
* @version 1.1.08142012 | |
*/ | |
public class ApplicationLauncher { | |
private String path; | |
private Process p; | |
/** |
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
private class StreamGobbler extends Thread { | |
InputStream is; | |
String type; | |
/** | |
* | |
* @param is InputStream | |
* @param type The type: "ERROR", etc. | |
*/ |
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
$gdata = $printsLogs | Group-Object -Property userId | |
$test = @() | |
$test += foreach($item in $gdata){ | |
$item.Group | Select -Unique userId, | |
@{Name = 'PageTotal';Expression = {(($item.Group) | measure -Property pages -sum).Sum}} | |
} |
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
awk -F":" '{ print "username: " $1 "\t\tuid:" $3 }' /etc/passwd |
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 java.io.File; | |
public class SomeProgram { | |
public static void main(String[] args) { | |
if(args.length > 0) { | |
File file = new File(args[0]); | |
// Work with your 'file' object here | |
} | |
} |
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
public class bubble { | |
public static void main(String[] args) { | |
int[] a = {9, 1, 67, 54, 37}; | |
int i, j, t = 0; | |
int n = 5; | |
for (i = 0; i < n; i++) { | |
for (j = 1; j < (n - i); j++) { | |
if (a[j - 1] > a[j]) { | |
t = a[j - 1]; |
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/python | |
# Version 2 | |
print (30 * '-') | |
print (" M A I N - M E N U") | |
print (30 * '-') | |
print ("1. Backup") | |
print ("2. User management") | |
print ("3. Reboot the server") | |
print (30 * '-') | |
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
package softwareconstructionexample_01; | |
public class SoftwareConstructionExample_01 { | |
public static void main(String[] args) { | |
int x = 0; | |
double y = 0.0; | |
for (int i = 0; i < 11; i++) { | |
y = 2.0; |