Skip to content

Instantly share code, notes, and snippets.

View alejandrosuarez's full-sized avatar
💭
🎶... Don't tell me you're too blind to see... 😎 Never gonna...🕺

Alejandro Suarez alejandrosuarez

💭
🎶... Don't tell me you're too blind to see... 😎 Never gonna...🕺
View GitHub Profile
@alejandrosuarez
alejandrosuarez / code-1.cfm
Created May 24, 2023 16:56 — forked from bennadel/code-1.cfm
Ask Ben: Delete Values In A Given List Using ColdFusion
<cffunction
name="ListDeleteValue"
access="public"
returntype="string"
output="false"
hint="Deletes a given value (or list of values) from a list. This is not case sensitive.">
<!--- Define arguments. --->
<cfargument
name="List"
@alejandrosuarez
alejandrosuarez / js-cmd-line.md
Created May 11, 2023 13:54 — forked from rosswd/js-cmd-line.md
Running Javascript from the command line.

Running JavaScript from the command line

I get quite frustrated running JS by pasting into Chrome/FF and sometimes I like to keep everything local. These are some notes on using Apple's built in intrerpreter, node or phantom.

Using Apple's built in interpreter

Create a symlink by putting jsc into /usr/bin

sudo ln -s /System/Library/Frameworks/JavaScriptCore.framework/Versions/A/Resources/jsc /usr/bin

1. Use the jsc alias as a REPL

@alejandrosuarez
alejandrosuarez / sidebar.js
Created May 9, 2023 15:37 — forked from Eugeny/sidebar.js
macOS finder favourites parser
const bplist = require('bplist-parser');
const { isObject } = require('rxjs/internal-compatibility');
(async () => {
let content = await bplist.parseFile(process.env.HOME + '/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.FavoriteItems.sfl2')
content = content[0];
let root = content.$top.root

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

Given a subscribed calendar with a url like

https://example.com/example.ics

To force Google Calendar to refresh and reload the contents right now, unsubscribe from the calendar and subscribe to a new calendar with a URL like

https://example.com/example.ics#1

Adding the anchor tag will force Google Calendar to think of it as a new calendar

@alejandrosuarez
alejandrosuarez / move_to_rds.rb
Created November 25, 2015 06:29 — forked from guenter/move_to_rds.rb
A quick and dirty script to move a database into Amazon RDS (or any other database). Can transfer part of the data beforehand.
require 'fileutils'
start_time = Time.now
SOURCE_DB = {
:name => 'db_name',
:user => 'db_user',
:password => 'db_pass',
:host => 'localhost'
#https://gorails.com/setup/ubuntu/14.04
sudo apt-get update
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc
rvm install 2.1.2
rvm use 2.1.2 --default