Skip to content

Instantly share code, notes, and snippets.

@codediodeio
codediodeio / database.rules.json
Last active June 22, 2024 07:03
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
anonymous
anonymous / index.html
Created August 24, 2016 07:25
Quick howto: embed PDF/ Office documents viewers How to embed PDF and MS Office docs viewers into a web application using Google Docs viewer and Office Apps viewer // source https://jsbin.com/cojuyeg
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="How to embed PDF and MS Office docs viewers into a web application using Google Docs viewer and Office Apps viewer">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Quick howto: embed PDF/ Office documents viewers</title>
<style id="jsbin-css">
body {
background-color: #009688;
@tim545
tim545 / lg-jquery-app-struct.md
Last active March 11, 2024 18:59
Structuring a large jQuery application

Structuring a large jQuery application

This document assumes you are building a traditional backend-heavy application as opposed to a frontend-heavy appliction which would typically use a framework like Angular or React. The use of these frameworks make this document irrelevant, however also require a change to your application architecture and a much larger overhead in order to get content onto a page, so as a simple way to build interactive web content a simple jquery based js stack will do fine.

Directory structure

It's important you use a directory structure which is impartial to your development environment, chosen server language (Python v. Java v. C# ...), and styling framwork (Twitter Bootstrap etc). This layer of separation means you can swap out the styles or the backend with minimal changes to the Js, simple and maintainable.

Here's an example from the project root:

@lietwin
lietwin / dropbox_api_with_httr.md
Created October 21, 2015 13:48
Dropbox API OAuth2 authentication and API calls in R via the package {httr}

#Using Dropbox API in R via {httr}

Description

Connect to DropBox API via OAuth2.0 in R and manipulate folders and files using {httr} package. The following uses Dropbox API v2

Connecting to Dropbox API

Get the Dropbox app settings (name, key etc.)

# Provide a .csv file containing your apps credentials with the following header