Skip to content

Instantly share code, notes, and snippets.

@codyeatworld
codyeatworld / ffmpeg.rb
Created September 27, 2012 14:09
Install FFMpeg, x264, fdk-aac, libvpx, qt-faststart.
# Notes:
# -----------------------------------------------------------------
# Ubuntu 12.04
# Sep 27, 2012
# -----------------------------------------------------------------
# I followed the instructions located on their website.
# https://ffmpeg.org/trac/ffmpeg/wiki/UbuntuCompilationGuide
#
# I ran into the following errors.
# -----------------------------------------------------------------
http://localhost:3000/
GET / HTTP/1.1
Host: localhost:3000
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:37.0) Gecko/20100101 Firefox/37.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Cookie: _awesome-csp_session=b2FablFScTA2SzE4S2FlVTA0UktiU2ZuM2w0UEhkdG5EYWtaQTJHTERDbHJEamM3ZFV1VitkeTQ1bncyN2hPUjQ5bWlNL05DeVlub2RWQVFQZWZmOFNxZmpXMi8xWXU1SnVBWWdKNHJWYkZKWlV5KzNiTUFiUmZjM2JHL0pvUUdFWHlGNC9sNHZkaCtvSTQwamdyS0pnPT0tLStCWVhlcWZJNlUvaWd6WEo5Rzhaa3c9PQ%3D%3D--4c6ecdd709d7b2049b286996bdfe0a1c8cb821dc
Connection: keep-alive
module CurrentCheckout
extend ActiveSupport::Concern
included do
before_action :set_current_checkout
end
private
def set_current_checkout
module Permissions
class AdminPermission < BasePermission
def initialize(user)
allow_all
end
end
end
@codyeatworld
codyeatworld / add_file_to_printnode_queue.rb
Last active November 18, 2015 12:07
easypost_printnode_slack.rb
# app/services/add_file_to_printnode_queue.rb
require 'printnode'
class AddFileToPrintnodeQueue
def self.call(file_url, title, printer_name, file_type='pdf_uri')
# Connect to the API and setup a Client object.
auth = PrintNode::Auth.new(ENV['printnode_api_key'])
client = PrintNode::Client.new(auth)
@codyeatworld
codyeatworld / simple_form_bootstrap.rb
Created November 27, 2015 17:55
Changes to the simple form initializer for bootstrap 4 alpha
# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
config.error_notification_class = 'alert alert-danger'
config.button_class = 'btn btn-primary'
config.boolean_label_class = nil
config.wrappers :vertical_input_group, tag: 'div', class: 'form-group', error_class: 'has-danger' do |b|
b.use :html5
b.use :placeholder
b.use :label, class: 'form-control-label'
@codyeatworld
codyeatworld / djangogen.sh
Last active April 6, 2018 17:46
Generate django projects
# Usage:
# djgen <project_name> <app_name>
# Parameters:
# $1 <project_name>
# $2 <app_name>
djgen() {
echo "👟 [Running] django-admin startproject $1"
django-admin startproject $1
<app-map [center]="center" [shops]="shops"></app-map>
<app-map-list [shops]="shops"></app-map-list>
{
"workbench.colorTheme": "One Dark Pro",
"files.autoSave": "onFocusChange",
"editor.fontSize": 14,
"editor.fontFamily": "Fira Code",
"editor.tabSize": 2,
"editor.fontLigatures": false,
"editor.renderWhitespace": "all",
"files.insertFinalNewline": true,
"search.exclude": {
//
// ViewController.swift
// Trailer
//
// Created by Cody Lopez on 1/18/18.
// Copyright © 2018 Cody Lopez. All rights reserved.
//
import UIKit
import Mapbox