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.util.Random; | |
import java.util.Scanner; | |
public class GuessingGame { | |
public static void main (String[] args) { | |
Scanner scan = new Scanner(System.in); | |
Random generator = new Random(); | |
final int MAX = 10; | |
int answer, guess; | |
String another = "y"; |
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
const spawn = require('child_process').spawn; | |
const read = require('read'); | |
const inpathSync = require('inpath').sync; | |
const pidof = require('pidof'); | |
const path = process.env['PATH'].split(':'); | |
const sudoBin = inpathSync('sudo', path); | |
let cachedPassword = null; |
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 IfElse { | |
public static void main (String[] args) { | |
int a = 4; | |
if (a == 1) { | |
System.out.println("A is 1"); | |
} else { | |
if (a == 2) { |
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
# Location: /srv/salt/raidarray/ | |
## notice namespacing at top-level of each block, followed by the module.function | |
raid-create-array: | |
cmd.script: | |
- source: salt://raidarray/create_raid.sh | |
- cwd: / | |
- user: root | |
# here I am calling the pkg module and installed function but it requires first that cmd module ran previously on namespaced |