Skip to content

Instantly share code, notes, and snippets.

View abhishekbhalani's full-sized avatar
🎄
working on latest framework...

Abhishek B. abhishekbhalani

🎄
working on latest framework...
View GitHub Profile
@rcotrina94
rcotrina94 / How to use Images as Radio buttons.md
Last active January 30, 2025 09:22
How to use images for radio buttons (input-radio).
@trailmax
trailmax / AzureStorageApi
Last active March 10, 2021 11:02
Unit testing the functionality to upload files to Azure Blob Storage via REST API. For blog post: http://tech.trailmax.info/2013/11/how-to-test-code-for-accessing-azure-storage-rest-api/ Please note, this implementation only supports file up to 64Mb in size. Anything larger and you need to chop files in pieces and upload them separately. There i…
using System;
using System.Collections.Generic;
using System.IO;
using System.Net.Http;
namespace PackageUploader.Azure
{
public class AzureStorageApi
{
public void UploadFile(String fullFilePath, String blobSasUri, Dictionary<String, String> metadata = null)
@PaulGreenwell
PaulGreenwell / C# ToJson extension class
Created September 25, 2013 04:20
Sample C# extension to serialise a class to JSON
using System.IO;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
public static class JsonExtensions
{
public static string ToJson(this object entity)
{
var serializer = new JsonSerializer();
serializer.Converters.Add(new StringEnumConverter());
@jansanchez
jansanchez / gist:6694824
Created September 25, 2013 03:23
How do I store an array of objects in a cookie with jQuery $.cookie()?
/*
Cookies can only store strings. Therefore, you need to convert your array of objects into a JSON string.
If you have the JSON library, you can simply use JSON.stringify(people) and store that in the cookie,
then use $.parseJSON(people) to un-stringify it.
In the end, your code would look like:
*/
var people = [
{ 'name' : 'Abel', 'age' : 1 },
{ 'name' : 'Bella', 'age' : 2 },
@BrandonSmith
BrandonSmith / AndroidManifest.xml
Last active July 19, 2023 19:11
Quick example of how to schedule a notification in the future using AlarmManager
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cards.notification">
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
@Krummelz
Krummelz / GridView to CSV Export Utility
Created September 12, 2013 07:23
A utility class to export an ASP.NET GridView control with its contents to a CSV file.
using System.IO;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
/// <summary>
/// Exports a GridView with its contents to a CSV file
/// </summary>
public class GridViewExportUtil
{
@ianrose
ianrose / index.html
Created August 27, 2013 23:00
css-keyframe-background-images
<html>
<head>
<style>
body {
background-color: #fff;
-webkit-background-size: cover;
-moz-background-size: cover;
background-size: cover;
-webkit-animation-duration: 10s;
-moz-animation-duration: 10s;
@bhays
bhays / Typeahead-BS3-css
Created August 2, 2013 13:54
Bootstrap 3 style fixes for using Typeahead.js
.twitter-typeahead .tt-query,
.twitter-typeahead .tt-hint {
margin-bottom: 0;
}
.tt-hint {
display: block;
width: 100%;
height: 38px;
padding: 8px 12px;
font-size: 14px;
@rsadwick
rsadwick / canvas_animation
Created July 18, 2013 15:47
Canvas animation with easel.js and tweenmax
<!DOCTYPE html>
<html>
<head></head>
<body onLoad="init();">
<p>demo</p>
<canvas id="demoCanvas" width="640" height="480">
alternate crap for junk ass users
</canvas>
@Daniel15
Daniel15 / 1_README.md
Last active March 22, 2025 04:24
Complete Google Drive File Picker example

Google Drive File Picker Example

This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.

Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.

See a demo at http://stuff.dan.cx/js/filepicker/google/