Skip to content

Instantly share code, notes, and snippets.

function changeIcon(){
var type = get('show') || 'day';
var canvas = document.createElementNS("http://www.w3.org/1999/xhtml", "canvas");
canvas.width = 128;
canvas.height = 128;
var ctx = canvas.getContext("2d");
var img = new Image();
img.onload = function(){
ctx.drawImage(img,0,0);
var date = new Date();
$.ajax({
url: the_url_here,
type: "get", //send it through get method
dataType: 'json',
//data: data, // put all the GET params here
success: function(response) {
//Do Something
console.log(response);
},
error: function(xhr) {
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Test Page</title>
</head>
<body>
@chrisgo
chrisgo / web.config
Last active July 14, 2016 23:08
RockRMS web.config for forcing HTTPS
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="resizer" type="ImageResizer.ResizerSection,ImageResizer" requirePermission="false" />
<section name="quartz" type="System.Configuration.NameValueSectionHandler, System, Version=1.0.5000.0,Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</configSections>
<quartz>
<add key="quartz.scheduler.instanceName" value="RockSchedulerIIS" />
<!-- Configure Thread Pool -->
<add key="quartz.threadPool.type" value="Quartz.Simpl.SimpleThreadPool, Quartz" />
<?php
defined('SYSPATH') or die('No direct script access.');
/**
* Lookup
*
* @package Velocimedia
*/
class Velocimedia_Lookup
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
#
# With php5-fpm:
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}