Skip to content

Instantly share code, notes, and snippets.

View Rio517's full-sized avatar

Mario Olivio Flores Rio517

View GitHub Profile
@Rio517
Rio517 / install_chrome_flash.sh
Last active July 31, 2016 21:42
raspbery pi install chrome and flash
# Original Source: https://drive.google.com/file/d/0B2X5T2P-KI8mUVNGSlVhYjVnNGc/view
#Install Chromium Browser
wget https://www.dropbox.com/s/emv1akq9lm4gi3c/chromium-browser-l10n_50.0.2661.102-0ubuntu0.14.04.1.1118_all.deb?dl=0
wget https://www.dropbox.com/s/12ht1lgpossgq0q/chromium-browser_50.0.2661.102-0ubuntu0.14.04.1.1118_armhf.deb?dl=0
wget https://www.dropbox.com/s/041d46qhi9yhla7/chromium-codecs-ffmpeg-extra_50.0.2661.102-0ubuntu0.14.04.1.1117_armhf.deb?dl=0
sudo dpkg -i chromium-browser_50.0.2661.102-0ubuntu0.14.04.1.1118_armhf.deb?dl=0
sudo dpkg -i chromium-codecs-ffmpeg-extra_50.0.2661.102-0ubuntu0.14.04.1.1117_armhf.deb?dl=0
sudo dpkg -i chromium-browser-l10n_50.0.2661.102-0ubuntu0.14.04.1.1118_all.deb?dl=0
@Rio517
Rio517 / google_calendar_merge.js
Created July 26, 2016 14:07
This script will merge multiple calendars into a separate, isolated calendar.
// Google Calendar Merge Script
// This script will merge multiple calendars into a single calendar. Slightly updated from an
// earlier version: http://techingthetech.blogspot.co.uk/2015/04/merging-google-calendars.html
//
// Usage:
// 1. Grab the calendar name and IDs for your target calendar and the ones you want to merge
// 2. Go to Google Drive and create a new Google Apps Script (it will be under New > More).
// 3. Search for the "App Script" add it and allow it to work.
// 4. Create a new script and copy and past this code in there.
// 5. Add your IDs below for the target calender to import to and to import from.
@Rio517
Rio517 / example_01_without_data.json
Last active May 27, 2016 14:33
Example Ember JSON Format for sideloading
{
"classrooms" : [
{
"classroom_name" : "Class 1",
"id" : 1,
"teacher_id" : 3,
"grade" : 5,
"assignments" : [
],
@Rio517
Rio517 / example_fixtures.js
Created May 27, 2016 13:21
Example Ember JSON w/ sideloaded data
ChatApp.Conversation.FIXTURES = [{
profile: 'first',
id: 6,
messages: [1,2,3,4]
},{
profile: 'second',
id: 7,
messages: [5,6,7,8]
},{
profile: 'third',
@Rio517
Rio517 / build_as_remote.bash
Created February 7, 2016 08:17
Setup Remote XFCE Desktop Build
# After creating a box on digital ocean, you can run this scrip to createa remote desktop
# digial ocean mirror have issues, swap out.
sudo sed 's/mirrors.digitalocean.com/mirror.us.leaseweb.net/g' -i /etc/apt/sources.list
sudo apt-get update
sudo apt-get install python-software-properties software-properties-common -y
sudo apt-add-repository -y ppa:x2go/stable
sudo apt-get update
sudo apt-get install x2goserver x2goserver-xsession -y
sudo apt-get install xfce4 -y
@Rio517
Rio517 / process_open_secrets.sh
Last active February 5, 2016 15:36
Bash script to Filter and Join FEC data downloaded from OpenSecrets.org for use in MAYDAY PAC donor strike tool.
#### README ######
#
#### Overview
# This script prepares FEC data for use in a 3rd party search service.Info
# on search service can be found here:
# https://developer.ibm.com/clouddataservices/2016/01/21/introducing-simple-faceted-search-service/
#
# This was script was created pretty quickly, but should mostly work on any
# generic *nix box with the dependencies listed below.
#
@Rio517
Rio517 / _service.md
Last active January 15, 2016 13:52 — forked from naholyr/_service.md
Sample /etc/init.d script (with current github raw link)

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@Rio517
Rio517 / reforms.json
Created June 2, 2015 21:04
Government Reform Data
{
"reforms": [{
"active": true,
"slug": "government-by-the-people-act",
"title": "Government By the People Act",
"reformType": "legislative",
"url": "http://ofby.us",
"parties": ["D"],
"id": 0,
"descriptionShort": "The Government by the People Act is a proposed bill to reform the campaign finance system, introduced into the House by 2014 by John Sarbanes (D-MD). A companion bill, the Fair Elections Now Act, was also introduced into the Senate.\n\nUnder the proposed bill, political contributions of up to $150 would be matched by a factor of six times more than the original donation as long as candidates meet certain requirements. They must not use their own money, not accept donations over $1000, have already received at least $50,000 from 1000 in-state donors, and decline most political action committee money.\n",
@Rio517
Rio517 / all-locatoin-map-viz.json
Last active August 29, 2015 14:19
Fake map viz
[{
"map_key": "SD-JUNIOR",
"coordinates": [12, 12],
"legislator": {
"name": "Mike Rounds",
"title": "Senator",
"party": "R",
"support_max": "cosponsored",
"targeted": false,
"image_url": "https://s3.amazonaws.com/audio.mayday.us/congress-photos/99x120/R000605.jpg",
@Rio517
Rio517 / api-sample-doc.json
Last active August 29, 2015 14:14
api-sample-doc
{
"swagger": "2.0",
"info": {
"version": "0.0.1",
"title": "MAYDAY"
},
"paths": {
"/stats": {
"get": {
"description": "returns list of global stats\n",