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 / wp-cli-migrate-db.md
Created September 25, 2023 19:06 — forked from harryfinn/wp-cli-migrate-db.md
WP-CLI DB migrate instructions

Instructions for using WP-CLI to migrate a WordPress DB

# Export current (local) DB
wp db export db.sql

# Copy file from local to server (may need to amend server path if not in html folder)
# The example below is for local to remote, simply swap these 2 around for remote to local
scp -r db.sql www-data@IP_ADDRESS:/var/www/html

# SSH onto box (should be same connection details as above)

From: pngwn/MDsveX#293

In #259 I alluded to other changes in v1, besides the configuration API. The biggest one is something that has been one of my biggest frustration in some regards: markdown itself. Now, lets get this out of the way: markdown is excellent and easily the best document markup format we have ever had. Kudos to Mr Gruber and all who have pushed markdown forward. Nothing in this document should be considered a derogation of markdown, I have nothing but respect and admiration for everything that has brought us to this point. This is a criticism, in many ways, but hopefully a constructive one. It is also just the opinion of a single penguin, and a penguin of questionable character, at that.


Penguin-flavoured markdown

@rdela
rdela / sublime-text-scopes.md
Created July 27, 2022 03:56 — forked from J2TEAM/sublime-text-scopes.md
Sublime Text 2/3: Snippet scopes

Here is a list of scopes to use in Sublime Text 2/3 snippets -

ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
@rdela
rdela / sublime-text-macos-context-menu.md
Created March 26, 2022 21:47 — forked from idleberg/sublime-text-macos-context-menu.md
“Open in Sublime Text” in macOS context-menu

This list has been updated for Big Sur (and later). Since I don't use these versions, this guide might still need further improvements. For older macOS versions, please see this older revision.

Open in Sublime Text

  • Open Automator
  • Quick Action
  • Set “Service receives selected” to files or folders in any application
  • Add a Run Shell Script action
  • Set the script action to /Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n "$@"
  • Set “Pass input” to as arguments
@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"
@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 / 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} />}
#!/bin/bash
#
# convert-mp4-to-mkv.sh
#
# Copyright (c) 2013-2014 Don Melton
#
about() {
cat <<EOF
$program 1.0 of May 30, 2014
#!/bin/bash
#
# detect-crop.sh
#
# Copyright (c) 2013-2014 Don Melton
#
about() {
cat <<EOF
$program 2.0 of February 7, 2014
#!/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.
#