Skip to content

Instantly share code, notes, and snippets.

@narkai
narkai / VideoExport.pde
Created January 24, 2025 14:29
VideoExport with alpha
// Simplified version of VideoExport by Abe Pazos
// https://funprogramming.org/VideoExport-for-Processing/
// https://github.com/hamoid/video_export_processing
// http://ffmpeg.org/
import java.io.OutputStream;
import java.io.File;
import java.io.IOException;
@narkai
narkai / application.rb
Created November 7, 2015 12:44
CORS config in server app
require File.expand_path('../boot', __FILE__)
require 'rails/all'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module VuteServer
class Application < Rails::Application
@narkai
narkai / gist:3b4dc09a72f5ee858967
Last active August 29, 2015 14:27
patch spec
patch "/api/v1/users/:id" do
parameter :type, <<-DESC, required: true
Should always be set to <code>users</code>.
DESC
parameter :id, <<-DESC, required: true
The id of the user.
DESC
parameter :name, <<-DESC, scope: :attributes
The name of the user.
DESC
@narkai
narkai / gist:c0a75d4e729a10fab928
Last active August 29, 2015 14:27
json api request spec
require 'rails_helper'
describe "users", :type => :request do
describe 'users#create' do
context "when is successfully created" do
before(:each) do
params = {