Skip to content

Instantly share code, notes, and snippets.

<p>
<strong>Foo Name</strong>
</p>
<p>
<strong>Skills</strong>
</p>
<ul>
<li>HTML</li>
</ul>
var userChoice = prompt("Please choose rock, paper, or scissors");
var computerChoice = Math.random();
if(computerChoice >=0 && computerChoice<0.33){
computerChoice = "rock";
}
else if((computerChoice > 0.33) && (computerChoice<0.67)){
computerChoice = "scissors";
}
// never do an if/else without {}. It's a lie that it is is allowed. NO! Just don't do it! It's like cake.
else {
@jhgaylor
jhgaylor / client_methods.js
Last active November 19, 2015 06:09
An accompaniment for a blog post on blog.JakeGaylor.com where we help Frank's gym.
client.save = function (callback) {
if (client._id) {
collection.updateOne({_id: client._id}, client, callback);
} else {
collection.insertOne(client, callback);
}
}
client.recordResponse = function (response, callback) {
if (client.wasSentSMS.monthThree) {
response.milestone = "monthThree";
```
$ kubectl stop rc project-api-controller --v=10
I1110 16:35:54.355697 2892 debugging.go:102] curl -k -v -XGET -H "User-Agent: kubectl/v1.0.6 (linux/amd64) openshift/403de38" http://localhost:8080/oapi
I1110 16:35:54.357250 2892 debugging.go:121] GET http://localhost:8080/oapi 404 Not Found in 1 milliseconds
I1110 16:35:54.357266 2892 debugging.go:127] Response Headers:
I1110 16:35:54.357273 2892 debugging.go:130] Content-Type: application/json
I1110 16:35:54.357279 2892 debugging.go:130] Date: Tue, 10 Nov 2015 23:35:54 GMT
I1110 16:35:54.357285 2892 debugging.go:130] Content-Length: 183
I1110 16:35:54.357317 2892 request.go:777] Response Body: {
"paths": [
@jhgaylor
jhgaylor / foo.js
Created September 15, 2015 23:06
<!-- this is a comment
console.log("omg that worked!")
apiVersion: v1
kind: ReplicationController
metadata:
name: redis-slave
labels:
name: redis-slave
spec:
replicas: 2
selector:
name: redis-slave
Template.foo.helpers({
a: function () { return "asdf"; },
b: function () { return Template.current().helpers.a();}
})
- digital_ocean:
state: present
command: ssh
name: my_key
ssh_pub_key: 'XXX'
client_id: "XXX"
api_key: "XXX"
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="utf-8" ?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document id="root_doc">
<Schema name="msschools" id="msschools">
<SimpleField name="Descriptio" type="string"></SimpleField>
</Schema>
<Folder><name>msschools</name>
<Placemark>
<name>Aberdeen School District</name>
<Style><LineStyle><color>ff0000ff</color></LineStyle><PolyStyle><fill>0</fill></PolyStyle></Style>
var goal_urls = [];
var urls = part.twitter_entities && part.twitter_entities.urls || [];
var raw_media_urls = part.twitter_entities && part.twitter_entities.media || [];
raw_media_urls.forEach(function (url) {
goal_urls.push(url.media_url)
});
urls.forEach(function (url) {
if(url.expanded_url && url.expanded_url.match('instagram.com')){
goal_urls.push(url.expanded_url+"media/")