Last active
August 29, 2015 14:09
-
-
Save bmcminn/6a789563d5f6306f3008 to your computer and use it in GitHub Desktop.
Gist Source Samples
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 <iostream> | |
int main() { | |
std::cout << "Hello World!" << std::endl; | |
std::cin.get(); | |
return 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
html { | |
font-family: "Times New Roman", serif; | |
color: #333; | |
font-size: 1rem; | |
background-color: #fff; | |
} | |
/** | |
Testing CSS COMments | |
*/ | |
html * { | |
font-size: inherit; | |
} | |
span[data-attr="testing"] { | |
background-image: url('testing.com/sdjfkls.jpg'); | |
} | |
div.closed { | |
display: none; | |
height: auto; | |
width: 100%; | |
-webkit-border-radius: 3px; | |
border-radius: 3px; | |
} |
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Testing</title> | |
<link rel="stylesheet" href="sdfomdssklfjsd.com/sdjfklsdjl"> | |
</head> | |
<body> | |
<div class="row"> | |
<div class="container"> | |
<h1 class="title">Pants</h1> | |
<p> | |
Something contains an <a href="sdfjskdl">sdfklsdfjsldf</a> | |
</p> | |
<img src="sdfsdfkl.com/sdksld" alt="sdjfksldfjsl"> | |
</div> | |
</div> | |
<script src="sdsomdfdkl.com/sjdkfsldjlfsd.js"></script> | |
</body> | |
</html> |
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
<?php | |
class cURL { | |
/** | |
* cURL request method | |
* | |
* @var string | |
*/ | |
protected $_method = 'GET'; | |
// get over it... | |
protected $_methods = array('POST', "GET"); | |
static public function get($url = '', $params = array(), $options = array()) { | |
$args = [ | |
"test" => true | |
, "test2" => 23 += 12 | |
, "test3" => "varsids" . 'stes' | |
, "test4" => CONSTANT_VALUE | |
]; | |
return self::make($url, $params, $options, 'GET'); | |
} | |
} |
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 random | |
guesses_made = 0 | |
name = raw_input('Hello! What is your name?\n') | |
number = random.randint(1, 20) | |
print 'Well, {0}, I am thinking of a number between 1 and 20.'.format(name) | |
while guesses_made < 6: | |
guess = int(raw_input('Take a guess: ')) | |
guesses_made += 1 | |
if guess < number: | |
print 'Your guess is too low.' | |
if guess > number: | |
print 'Your guess is too high.' | |
if guess == number: | |
break | |
if guess == number: | |
print 'Good job, {0}! You guessed my number in {1} guesses!'.format(name, guesses_made) | |
else: | |
print 'Nope. The number I was thinking of was {0}'.format(number) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment