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
#!/bin/bash | |
#Script for moving files into Dropbox. Makes sure there's no nasty surprises. | |
set -euo pipefail | |
echo "Calculating size..." | |
du -hcs $* | |
echo "Drop this much data?" | |
select yn in "Yes" "No"; do | |
case $yn in | |
Yes ) cp $* ~/Dropbox; break;; | |
No ) exit;; |
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
#include "hashtable.h" | |
#include <stdio.h> | |
int print_hashtable(HashTable *ht); | |
HashTable *ht_create(unsigned int size); | |
int ht_put(HashTable *hashtable, const char *key, const char *value); | |
unsigned int hash(const char *key, unsigned int size); | |
int main(void) { | |
HashTable *ht = ht_create(5); |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/socket.io/1.3.5/socket.io.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> | |
<script> | |
$(document).ready(function() { | |
var socket = io.connect('http://' + document.domain + ':' + location.port); | |
socket.on("loaded", function() { | |
console.log("loaded adsfadsfasdfadf"); |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/socket.io/1.3.5/socket.io.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script> | |
<script> | |
$(document).ready(function() { | |
var socket = io.connect('http://' + document.domain + ':' + location.port); | |
var hello = {"id": "asDFasDF12", "word_1": "Flask", "word_2": "Sockets", } | |
socket.emit("hello", hello); |
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 Account | |
{ | |
private double checkingBalance; | |
private double savingsBalance; | |
public Account ( Double balance1, Double balance2 ) | |
// constructor | |
{ | |
checkingBalance = balance1; | |
savingsBalance = balance2; |
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 Temp | |
{ | |
public static void main(String[] args) | |
{ | |
int first_argument = Integer.parseInt(args[0]); | |
int second_argument = Integer.parseInt(args[1]); | |
System.out.println("first_argument: " + first_argument); | |
System.out.println("second_argument: " + second_argument); |
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 Temp | |
{ | |
public static void main(String[] args) | |
{ | |
System.out.println(args[0]); | |
} | |
} |
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 Temp | |
{ | |
public static void main(String[] args) | |
{ | |
for (int i = 0; i < args.length; i++) { | |
System.out.println(args[i]); | |
} | |
} | |
} |
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
import java.util.Random; | |
public class Temp{ | |
public static void main(String[] args) | |
{ | |
Random random = new Random(); | |
//sum of two random integers | |
int q = random.nextInt(6)+1; | |
int c1 = random.nextInt(6)+1; |
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
#!/bin/bash | |
FLAG_n='BOT' | |
FLAG_c='#general' | |
FLAG_m='' | |
while getopts 'n:c:m:h' flag; do | |
case "${flag}" in | |
h) echo | |
echo 'SLACKPOST' |
NewerOlder