Skip to content

Instantly share code, notes, and snippets.

var rp = require('request-promise');
const m = require('moment')
const url = 'https://api.openweathermap.org/data/2.5/weather?q=Tallahassee,US&appid=d15dd962af5867dfbfeee729a5b05736'
console.log(url)
rp(url)
.then(function (htmlString) {
//console.log(htmlString)
@georules
georules / .block
Created March 22, 2017 18:29
Force-Directed Graph
license: gpl-3.0
height: 600
<!-- Include the Polyfill -->
<script src="https://www.javapoly.com/javapoly.js"></script>
<script type = "text/java" src="rhino1.7.7.1/lib/rhino-1.7.7.1.jar"></script>
<!-- Write your Java code -->
<script type="text/java">
package com.demo;
import com.javapoly.dom.Window;
import java.lang.String;
var server = https.createServer(options, app).listen(port, function(){
into
var server = https.createServer(options, app).listen(port, "hostname", function(){
var hextest = function(hex) {
function hexToRgb(hex) {
var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
return result ? {
r: parseInt(result[1], 16),
g: parseInt(result[2], 16),
b: parseInt(result[3], 16)
} : null;
}
$(".value").load("", "", function(d) {
var data = "data:image/jpg;base64," + $(".value").innerHTML
$("img").attr("src", data)
})
@georules
georules / README.md
Last active February 16, 2016 18:20
oh yes spiral fib
@georules
georules / README.md
Created February 16, 2016 17:49
oh yes spiral
<html>
<head>
<script src="http://code.jquery.com/jquery-1.12.0.min.js">
</script>
<script>
url = "http://api.openweathermap.org/data/2.5/weather"
function getData(loc) {
$.ajax({
url:url,
def encrypt(message, key):
encMessage = ""
for m in message:
n = ord(m) + key
encMessage = encMessage + chr(n)
return encMessage
def decrypt(message, key):
decMessage = ""
for m in message: