Skip to content

Instantly share code, notes, and snippets.

View robbiegod's full-sized avatar
🧛‍♂️

Robert Fletcher robbiegod

🧛‍♂️
View GitHub Profile
@ynotdraw
ynotdraw / OneDriveExtensions
Last active August 29, 2015 14:03
Nice little extension methods when using the Live 5.6 SDK to interact with OneDrive in a Windows Phone project. I needed a way to upload/download an encrypted text file from a user's OneDrive account for data backup for my app, #PassSafe. Feel free to let me know if I missed anything or if I can help you integrate this into your app!
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.IsolatedStorage;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Live;
// https://stackoverflow.com/questions/23715282/onedrive-upload-download-to-specified-directory
@awhites
awhites / nest.js
Created October 22, 2015 14:26
Test
var a = {
b: {
c: "nested!"
}
}
console.log(a.b.c);
<tile version='3'>
<visual branding='nameAndLogo'>
<binding template='TileMedium'>
<text hint-wrap='true'>New movies available</text>
<text hint-wrap='true' hint-style='captionSubtle'/>
</binding>
<binding template='TileWide'>
<text hint-wrap='true'>New movies available</text>
@ifinoi
ifinoi / gist:4474902
Created January 7, 2013 13:20
LastBreath for WindowsPhone 8
* Set Last Action */
public App()
{
// Global handler for uncaught exceptions.
BugSenseHandler.Instance.Init(this, "YOUR_API_KEY");
BugSenseHandler.SetLastBreath(MyMethod);
// ...do more stuff...
}
@adamjohnson
adamjohnson / index.html
Created October 3, 2012 19:48
Working with Attributes in Concrete5, download this code and paste into a .html document
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Working with Attributes in Concrete5</title>
<style>
pre { border: 1px solid black; padding:10px; }
</style>
</head>
<body>
<%@ WebHandler Language="C#" Debug="true" Class="name" %>
using System.Web;
public class name : IHttpHandler {
public void ProcessRequest (HttpContext context) {
}
public class BATTLEFRONT {
public static void main(String[] args) {
int age = 21;
System.out.println(oldEnough(age));
}
static boolean oldEnough(int age) {
@juanbrujo
juanbrujo / jquery.checkboxes-events.js
Last active February 23, 2016 18:51
jQuery checkboxes attach event on change state
// react then checkbox change state
$('input[type="checkbox"]').on('change', function(e) {
if( this.checked ) {
console.log('checked');
} else {
console.log('not checked');
}
});
// check
/* ----------- Galaxy S3 ----------- */
/* Portrait and Landscape */
@media screen
and (device-width: 320px)
and (device-height: 640px)
and (-webkit-device-pixel-ratio: 2) {
}
@mandrasch
mandrasch / edit.php
Created October 17, 2011 13:11
Loading WYSIWYG Editor in custom block (Concrete5)
<h2>Description 1</h2>
<?php
Loader::element('editor_init');
Loader::element('editor_config');
Loader::element('editor_controls');
?>
<div class="ccm-block-field-group" id="ccm-editor-pane">
<textarea id="description" class="ccm-advanced-editor advancedEditor" name="description" rows="5" style="width: 95%;"><?php echo $description; ?></textarea>
</div>