Skip to content

Instantly share code, notes, and snippets.

View thoughtpalette's full-sized avatar

Christopher Marshall thoughtpalette

View GitHub Profile
@thoughtpalette
thoughtpalette / datascience.R
Last active September 24, 2015 22:36
Line chart in R with CSV import
library(ggplot2)
# Import CSV file, Use default headers, comma delimited
fuck <- read.csv2("Caitlins.csv", header=T, sep=",")
# Assign cats (categories) to first row (x) Which is sample name
cats <- fuck$X;
# x axis(?)
markers <- 1:25
/* jqueryFileUpload-Plugin
https://github.com/blueimp/jQuery-File-Upload */
MYANGULARAPP.directive('myJqueryfileupload', function(){
return{
restrict:'E',
compile:function(el,attrs){
var compiler = this;
var elem = el;
// 2DO: serialize it from json?
@thoughtpalette
thoughtpalette / Smooth Mobile Animation Fixes
Created January 10, 2014 19:28
Mobile CSS Awesomeness
/* Fix overflow scrolling wonkiness */
-webkit-overflow-scrolling: touch;
.list-first-level,
.list-second-level,
.list-third-level {
-o-transition: .3s linear;
-ms-transition: .3s linear;
-moz-transition: .3s linear;
@thoughtpalette
thoughtpalette / s3_public_bucket.txt
Created March 18, 2016 20:25
Bucket policy for AWS S3 to make assets available publicly.
{
"Version":"2008-10-17",
"Statement":[{
"Sid":"AllowPublicRead",
"Effect":"Allow",
"Principal": {
"AWS": "*"
},
"Action":["s3:GetObject"],
"Resource":["arn:aws:s3:::YOUR_BUCKET_NAME/*"
/**
Copyright 2014-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at
http://aws.amazon.com/apache2.0/
or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
*/
@thoughtpalette
thoughtpalette / Infinite Scroll Markup
Last active December 6, 2016 12:12
ngInfiniteScroll Service
<table>
<thead>
<th>ID</th>
<th>Title</th>
<th>Creator Email</th>
<th># of Users</th>
<th># of Photos</th>
<th>Privacy Type</th>
<th>View Images</th>
</thead>
@thoughtpalette
thoughtpalette / Ionic Favorites Chapter
Created March 6, 2015 15:17
Ionic Favorites Chapter
## Setting up the Favorites view
In the previous chapter, you learned how to set up the application routes, define a state and link your state to your custom template and controller. We will be utilizing all of those constructs in this chapter in setting up the Favorites view.
The Favorites view will allow the user to add and save a location that will be used to find nearby Instagram posts.
We will be using the following modules and Ionic Plugins in this chapter:
1. HTML5 Local Storage (angular-local-storage)
2. Ionic Modal
@thoughtpalette
thoughtpalette / vowel-sort.js
Created December 9, 2019 15:06
Get Vowels from String, Sort and return by Count
var test = "SAMPLE";
function solution(S) {
let stringArr = [...S.toLowerCase()];
let vowelArr = ['a','e','i','o','u'];
const vowelString = stringArr.filter(letter => vowelArr.includes(letter)).sort().join('');
let finalString = '';
vowelArr = vowelArr.map(vowel => {
lefty semi-pro e-sport athlete kappa
------------------------- Support & Follow -----------------------
http://twitch.tv/vagdis
https://www.youtube.com/user/vagdis/videos
---------- LANs, Tournaments & League History ----------
Rocket League
@thoughtpalette
thoughtpalette / Serverless forms.
Created August 25, 2016 19:03
Gist for serverless forms on G Sheets
// Usage
// 1. Enter sheet name where data is to be written below
var SHEET_NAME = "testform";
// 2. Run > setup
//
// 3. Publish > Deploy as web app
// - enter Project Version name and click 'Save New Version'
// - set security level and enable service (most likely execute as 'me' and access 'anyone, even anonymously)
//