Skip to content

Instantly share code, notes, and snippets.

View rchasman's full-sized avatar
🥳

Roey D. Chasman rchasman

🥳
View GitHub Profile
@brianmfear
brianmfear / AWS.cls
Last active February 8, 2023 00:14
Abstract AWS implementation in Apex Code
/*
// Example implementation as follows:
public class AWSS3_GetService extends AWS {
public override void init() {
endpoint = new Url('https://s3.amazonaws.com/');
resource = '/';
region = 'us-east-1';
service = 's3';
accessKey = 'my-key-here';
method = HttpMethod.XGET;
@brianburridge
brianburridge / gist:8d2755a73dd5b4f0332b
Created December 10, 2014 19:47
Export local db to JSON
namespace :json do
desc "Export all data to JSON files"
task :export => :environment do
Rails.application.eager_load!
ActiveRecord::Base.descendants.each do |model|
file = File.open(File.join(Rails.root, "db", "export", "#{model.table_name}.json"), 'w')
file.write model.all.to_json
file.close
end
@rchasman
rchasman / sing.sh
Created April 9, 2014 06:55
This script helps you to learn song lyrics!
#!/bin/bash
# requires lolcat
if [ $# -eq 2 ]
then
artist=${1// /%20}
song=${2// /%20}
(curl -s "http://makeitpersonal.co/lyrics?artist=$artist&title=$song" | say -r 200 &);