Skip to content

Instantly share code, notes, and snippets.

View rdela's full-sized avatar
🐞
Various bug fixes and improvements

Ricky de Laveaga rdela

🐞
Various bug fixes and improvements
View GitHub Profile
@rdela
rdela / StripeTutorialPage.html
Created July 28, 2012 20:36 — forked from boucher/StripeTutorialPage.html
Stripe Tutorial Payment Form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Getting Started Form</title>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<!-- jQuery is used only for this example; it isn't required to use Stripe -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
// this identifies your website in the createToken call below
@rdela
rdela / gist:3776894
Created September 24, 2012 16:37 — forked from rmurphey/gist:3212725

Hey. So, we're writing because we're people who spend a lot of time in #jquery helping others -- people like you who are trying to get their bearings with jQuery or JavaScript or who are maybe struggling through some problem that's got them particularly stumped.

We've noticed that you've been kind of, well, dominating the channel a lot lately -- sort of like you're talking through every problem you're running into while you're working on your app, and sometimes repeating your inquiries when you don't get a response. We want to be helpful, we really do, but the constant stream of questions is ... well, it's led to a lot of us just tuning you out, and that's probably not what you want.

So: our biggest request is that you show a little more effort at working through your problems on your own, rather than announcing them in the channel shortly after you encounter them. Below are a few other suggestions; some are based on our experience, while others are from the excellent post about [help vampires](http://sla

#!/bin/bash
# encode.sh
#
# Copyright (c) 2013 Don Melton
#
# This version published on June 7, 2013.
#
# Re-encode video files in a format suitable for playback on Apple TV, Roku 3,
# iOS, OS X, etc.
#!/bin/bash
# batch.sh
#
# Copyright (c) 2013 Don Melton
#
# This version published on June 8, 2013.
#
# Batch control for the "encode.sh" script.
#
#!/bin/bash
#
# transcode-video.sh
#
# Copyright (c) 2013-2014 Don Melton
#
# This script uses `HandBrakeCLI` (see: <http://handbrake.fr/>) to transcode a
# video file or disc image directory into a format and size similar to videos
# available for download from the iTunes Store.
#
#!/bin/bash
#
# detect-crop.sh
#
# Copyright (c) 2013-2014 Don Melton
#
about() {
cat <<EOF
$program 2.0 of February 7, 2014
#!/bin/bash
#
# convert-mp4-to-mkv.sh
#
# Copyright (c) 2013-2014 Don Melton
#
about() {
cat <<EOF
$program 1.0 of May 30, 2014
@rdela
rdela / Hoverable.js
Created March 5, 2018 20:38 — forked from necolas/Hoverable.js
Hover styles in React Native for Web
import createHoverMonitor from './createHoverMonitor';
import { element, func, oneOfType } from 'prop-types';
import React, { Component } from 'react';
const hover = createHoverMonitor();
/**
* Use:
* <Hoverable>
* {(hover) => <View style={hover && styles.hovered} />}
@rdela
rdela / CForLoopExample.swift
Created June 27, 2019 16:19 — forked from JoshuaSullivan/CForLoopExample.swift
Don't mourn the removal of --, ++ and the C-style for loop from Swift. Read the blog post: http://www.chibicode.org/?p=24
let baseString = "/Documents/"
let words = ["Alpha", "Beta", "Gamma", "Delta"]
var paths : [String] = []
for (var i = 0; i < words.count; ++i) {
let word = words[i]
paths.append("\(baseString)\(word)")
}
print(paths)
@rdela
rdela / detweet.swift
Last active August 2, 2020 08:36 — forked from mxcl/detweet.swift
Delete all tweets and favorites older than two months ago. But don't unblock people. Instructions in comment.
#!/usr/bin/swift sh
import Foundation
import PromiseKit // @mxcl ~> 6.5
import Swifter // @mattdonnelly == b27a89
let swifter = Swifter(
consumerKey: "FILL",
consumerSecret: "ME",
oauthToken: "IN",
oauthTokenSecret: "https://developer.twitter.com/en/docs/basics/apps/overview.html"