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
function challengeUser (){ | |
var xhr = new XMLHttpRequest(); | |
var id = 58542; //Fuego bot user id | |
var url = "http://online-go.com/api/v1/players/"+id+"/challenge/"; | |
xhr.open("POST", url, true ); | |
xhr.setRequestHeader("Content-Type", "application/json"); | |
xhr.setRequestHeader("Authorization", "Bearer " + accessToken); | |
xhr.onreadystatechange = function () { | |
if (xhr.readyState == 4) { |
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
.RES-keyNav-activeElement, .commentarea .RES-keyNav-activeElement .md, .commentarea .RES-keyNav-activeElement.entry .noncollapsed { | |
background-color: white !important; | |
} | |
.link.last-clicked { | |
border: none; | |
} | |
* { | |
color:grey!important; |
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
def |
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
def slice_pizza(number_of_friends, number_of_slices): | |
# Cut pizza in half | |
number_of_slices = number_of_slices*2 | |
# Is there enough slices for everybody? | |
if number_of_slices >= number_of_friends: | |
# If yes - return our slices, it's time to eat pizza! | |
return number_of_slices | |
else: | |
# If not - then cut it in half once again. |
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
app.get('cards').models.map(function(c) { | |
Mousetrap.bind('alt+d', function(e) { | |
var today = new Date(); | |
var dd = today.getDate(); | |
var mm = today.getMonth()+1; //January is 0! | |
var yyyy = today.getFullYear(); | |
if(dd<10) { | |
dd='0'+dd | |
} |
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
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} | |
server { | |
# redirect from http to https | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
server_name hackertribe.io www.hackertribe.io; |
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
{ | |
"@context": "https://www.w3.org/ns/activitystreams", | |
"type": "Like", | |
"id": "https://social.example/alyssa/posts/5312e10e-5110-42e5-a09b-934882b3ecec", | |
"to": ["https://chatty.example/ben/"], | |
"author": "https://social.example/alyssa/", | |
"object": "https://chatty.example/ben/p/51086" | |
} |
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
{ | |
"@context": "https://www.w3.org/ns/activitystreams", | |
"type": "Person", | |
"id": "https://social.example/alyssa/", | |
"name": "Alyssa P. Hacker", | |
"preferredUsername": "alyssa", | |
"summary": "Lisp enthusiast hailing from MIT", | |
"inbox": "https://social.example/alyssa/inbox/", | |
"outbox": "https://social.example/alyssa/outbox/", | |
"followers": "https://social.example/alyssa/followers/", |
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
{ | |
"@context": "https://www.w3.org/ns/activitystreams", | |
"type": "Note", | |
"to": ["https://chatty.example/ben/"], | |
"attributedTo": "https://social.example/alyssa/", | |
"content": "Say, did you finish reading that book I lent you?" | |
} |
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
{ | |
"@context": "https://www.w3.org/ns/activitystreams", | |
"type": "Create", | |
"id": "https://social.example/alyssa/posts/a29a6843-9feb-4c74-a7f7-081b9c9201d3", | |
"to": ["https://chatty.example/ben/"], | |
"author": "https://social.example/alyssa/", | |
"object": { | |
"type": "Note", | |
"id": "https://social.example/alyssa/posts/49e2d03d-b53a-4c4c-a95c-94a6abf45a19", | |
"attributedTo": "https://social.example/alyssa/", |
OlderNewer