Skip to content

Instantly share code, notes, and snippets.

View NicoJuicy's full-sized avatar

Nico Sap NicoJuicy

View GitHub Profile
@mhawksey
mhawksey / gist:1442370
Last active February 25, 2024 12:01
Google Apps Script to read JSON and write to sheet
function getJSON(aUrl,sheetname) {
//var sheetname = "test";
//var aUrl = "http://pipes.yahoo.com/pipes/pipe.run?_id=286bbb1d8d30f65b54173b3b752fa4d9&_render=json";
var response = UrlFetchApp.fetch(aUrl); // get feed
var dataAll = JSON.parse(response.getContentText()); //
var data = dataAll.value.items;
for (i in data){
data[i].pubDate = new Date(data[i].pubDate);
data[i].start = data[i].pubDate;
}
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@captn3m0
captn3m0 / 01-Introduction.mkd
Last active October 6, 2015 00:58
Quick Primer to Software Development

This document is guided at SDSLabs members, but should be equally valid to anyone working in technology.

I've tried to keep all advice language agnostic and independent from any technology. This is like a series of short blog posts I've condensed to a single gist. Feel free to fork and give some more of such advice.

@havvg
havvg / ajax-form.js
Created August 1, 2012 13:20
jQuery AJAX form submit with Twitter Bootstrap modal
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
@pedroreys
pedroreys / Message.cs
Created April 12, 2013 20:18
Defining a custom JsonConverter and using it with the built-in JsonConverterAttribute
public class Message
{
[JsonConverter(typeof(SHA256StringJsonConverter))]
public string Password { get; set; }
}
namespace YourNamespace
{
/// <summary>
/// Uses the Name value of the <see cref="ColumnAttribute"/> specified to determine
/// the association between the name of the column in the query results and the member to
/// which it will be extracted. If no column mapping is present all members are mapped as
/// usual.
/// </summary>
/// <typeparam name="T">The type of the object that this association between the mapper applies to.</typeparam>
public class ColumnAttributeTypeMapper<T> : FallbackTypeMapper
@zQueal
zQueal / BTSync.md
Last active November 9, 2016 05:58
Debian and Ubuntu Server Packages for BitTorrent Sync client. Credit goes to Tuxpoldo (https://github.com/Tuxpoldo). Original Thread: http://forum.bittorrent.com/topic/18974-debian-and-ubuntu-server-packages-for-bittorrent-sync/

Since I was one of the alfa-testers, I was able to develop a deployment concept for linux servers which permits to deploy BitTorrent Sync as single or multiple daemons with specific configurations. There are now ready-to-use deb packages available both for Ubuntu or Debian with full debconf-support for automated creation of an optional default configuration. If you are searching for a version more suitable for personal desktop use, please look here. Update: User @tuxpoldo has opened a repository, and keeps it current. Follow those instructions instead!

#INSTALLATION IN UBUNTU

Currently there are packages available for Ubuntu precise, quantal, raring and saucy supporting both i386 and amd64. The packages can be easily installed by adding the PPA and then installing as usual:

sudo add-apt-repository ppa:tuxpoldo/btsync
sudo apt-get update
sudo apt-get instal
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active April 17, 2024 10:51
Backend Architectures Keywords and References
@stonehippo
stonehippo / RPi-Dashing-howto.md
Last active October 6, 2021 13:52
Setting up a Raspberry Pi as a dashboard server with Dashing

Setting up a Raspberry Pi as a dashboard server with Dashing

Why the heck did I do this?

I wanted to set up one of my Raspberry Pi's as a data dashboard, pushing sensor data to a web interface that's easy to digest. I decided to use Shopify's Dashing framework. Dashing is based on Sinatra, and is pretty lightweight.

Dashing does require Ruby 1.9.3 to run. In addition, it makes use of the execjs gem, which needs to have a working Javascript interpreter available. Originally, I tried to get therubyracer working, but decided to switch over to Node.js when I ran into roadblocks compiling V8.

One warning: The RPi is a very slow system compared with modern multi-core x86-style systems. It's pretty robust, but compiling all this complex software taxes the system quite a bit. Expect that it's going to take at least half a day to get everything going.