Skip to content

Instantly share code, notes, and snippets.

@donfrancisco
donfrancisco / macos-malware-error.md
Last active Jan 6, 2020
Catalina macOS 10.15: "Skype" can't be opened because Apple can't verify if it contains malware.
View macos-malware-error.md

There are two tips you can use to make using development tools on MacOS Catalina with Gatekeeper a bit easier.

1) Quarantine removal

The first tip is to remove quarantine flag in a recursive manner for your intended folder:

$ sudo xattr -r -d com.apple.quarantine /path/to/folder
@donfrancisco
donfrancisco / gist:adf164d8a9f271029ec0
Created Jan 5, 2015
OSX Yosemite show hidden files and folders
View gist:adf164d8a9f271029ec0

Show Hidden:

defaults write com.apple.finder AppleShowAllFiles -boolean true ; killall Finder

and to hide them:

defaults write com.apple.finder AppleShowAllFiles -boolean false ; killall Finder

@donfrancisco
donfrancisco / gist:7345969
Created Nov 6, 2013
Command line shortcut: Hide or show hidden system files in OS X Mavericks
View gist:7345969

Command line shortcut: Hide or show hidden system files in OS X Mavericks

Add the following in your ~./bash_profile

# Show hidden files in Finder
alias showsystem=”defaults write com.apple.finder AppleShowAllFiles TRUE”
# Hide hidden files in Finder
alias hidesystem=”defaults write com.apple.finder AppleShowAllFiles FALSE”
@donfrancisco
donfrancisco / sprites.js
Created Jan 28, 2013
Source code from blog post: Node.js w/1M concurrent connections! By Aaron “Caustik” Robinson http://blog.caustik.com/2012/08/19/node-js-w1m-concurrent-connections/
View sprites.js
// Source code from blog post: Node.js w/1M concurrent connections!
// By Aaron “Caustik” Robinson
// http://blog.caustik.com/2012/08/19/node-js-w1m-concurrent-connections/
// includes
var cluster = require('cluster');
var cpuCount = require('os').cpus().length;
var util = require("util");
var http = require("http");
View pingpong.rb
(1..100).each{|i|
x = ''
x += 'ping' if i%5==0
x += 'pong' if i%7==0
puts(x.empty? ? i : x);
}
@donfrancisco
donfrancisco / server.js
Created Aug 27, 2012 — forked from atian25/server.js
socket.io + express session
View server.js
//express3.0
var express = require('express');
var app = express();
app.set('port', 3000);
app.set('views', __dirname + '/views');
app.set('view engine', 'jade');
app.use(express.bodyParser());
app.use(express.methodOverride());
//session & cookie
@donfrancisco
donfrancisco / .gitignore
Created Aug 17, 2012 — forked from bergie/.gitignore
Node.js email handling examples
View .gitignore
config.json
reading-image.png
View google_calendar.rb
# Google Calendar access w/ Data API
# OAuth authentication.
require "sinatra"
require "excon"
require "cgi"
require "base64"
require "openssl"
require "digest/hmac"
require "json/pure"
@donfrancisco
donfrancisco / postgresapp_induction_rails.md
Created Jul 20, 2012 — forked from alexagui/postgresapp_induction_rails.md
Migrate a Rails project to Postgresql with Postgres.app and Induction
View postgresapp_induction_rails.md

I had issues installing Postgres with the instructions in this Railscast. However I was able to get postgres running on my project with http://postgresapp.com/ and http://inductionapp.com/ (Hat tip to this stackoverflow thread).

  1. Download & install Postgres.app (documentation) Make sure to install in /Applications.
  2. Update your PATH
    In my case I added the following to ~/.bash_profile
    export PATH="/Applications/Postgres.app/Contents/MacOS/bin:$PATH"
    Check that Postgres.app is being loaded
$ which psql
/Applications/Postgres.app/Contents/MacOS/bin/psql
@donfrancisco
donfrancisco / gist:2940467
Created Jun 16, 2012
redis twitter datastore
View gist:2940467
require "httparty"
require "redis"
require_relative "../models/twitter_status" # some wrapper for a Twitter status
class TwitterStream
attr_reader :twitter_handle, :tweets
attr_reader :cache # a helper to the Redis database
attr_reader :cached_response # the actual response from a API call
that is put into the cache
You can’t perform that action at this time.