Skip to content

Instantly share code, notes, and snippets.

@taiar
taiar / gist:3454098
Created August 24, 2012 18:36 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@taiar
taiar / database.yml.example mysql2
Created November 5, 2012 05:57 — forked from erichurst/database.yml.example mysql2
Rails 3 database.yml examples
# MySQL. Versions 4.1 and 5.0 are recommended.
#
# Install the MySQL driver:
# gem install mysql2
#
# And be sure to use new-style password hashing:
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
development:
adapter: mysql2
encoding: utf8
@taiar
taiar / git-cache-meta.sh
Last active August 29, 2015 14:28 — forked from andris9/git-cache-meta.sh
git-cache-meta
#!/bin/sh -e
#git-cache-meta -- simple file meta data caching and applying.
#Simpler than etckeeper, metastore, setgitperms, etc.
#from http://www.kerneltrap.org/mailarchive/git/2009/1/9/4654694
#modified by n1k
# - save all files metadata not only from other users
# - save numeric uid and gid
# 2012-03-05 - added filetime, andris9
command-shift-P > Package > Package Generator: Generate Syntax Theme > mypackage
cd ~/.atom/packages/mypackage
apm login
apm develop mypackage
cd ~/github/mypackage
sudo chown -R username:wheel .
git commit -a -m 'checking everything in'
apm publish --tag v2.5.0 minor
@taiar
taiar / museomix_electrolab.md
Created January 18, 2017 18:16 — forked from leucos/museomix_electrolab.md
Hosting #museomix : providing real-world access to exhibits via sensors and actuators

Context

Museomix is a short event where coders, designers, hackers, cultural and museum experts brainstorm on collections and museum installations. This document gives hints on setting up an electronic lab so attendees can benefit from real-world interactions.

General considerations

Often, exhibits must sense their environment (is there light ? is there a visitor ? ...) or act on their environment (turn the light on ! make a sound ! ...).

Soldering team

@taiar
taiar / connect-heroku-app-to-postgres-rds-with-ssl.md
Created August 4, 2017 17:45 — forked from glarrain/connect-heroku-app-to-postgres-rds-with-ssl.md
How to connect a Heroku application to an Amazon RDS PostgreSQL instance, forcing SSL and certificate chain verification

1 - Download the RDS certificates (root plus region-specific intermediate ones) bundle:

wget -O config/rds-combined-ca-bundle.pem https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem

2 - Add config/rds-combined-ca-bundle.pem to the repository and redeploy to Heroku.

3 - Update the DATABASE_URL env var:

@taiar
taiar / install-quake3.sh
Created December 18, 2019 13:43 — forked from simonewebdesign/install-quake3.sh
Install Quake 3: Arena on a mac
#!/bin/bash
# Install Quake 3: Arena on a mac
# Copyright (c) 2016 simonewebdesign
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
@taiar
taiar / AutoinstallMYSQL.sh
Created April 27, 2020 11:36 — forked from elialejandro/AutoinstallMYSQL.sh
MySQL 5.7 No directory, logging in with HOME=/
# Install MySQL
mysql_config_file="/etc/mysql/my.cnf"
echo "mysql-server mysql-server/root_password password secret" | sudo debconf-set-selections
echo "mysql-server mysql-server/root_password_again password secret" | sudo debconf-set-selections
apt-get -y install mysql-client mysql-server
sed -i "s/bind-address\s*=\s*127.0.0.1/bind-address = 0.0.0.0/" ${mysql_config_file}
usermod -d /var/lib/mysql/ mysql
@taiar
taiar / rearct-native-app-in-wsl2.md
Created January 15, 2021 21:31 — forked from bergmannjg/rearct-native-app-in-wsl2.md
Building a react native app in WSL2
@taiar
taiar / serbilian.rb
Created February 25, 2022 13:56 — forked from brunoro/serbilian.rb
Serbilian cyrilic: a cyrilic script for Brazilian Portuguese based in Serbian Cyrilic
#!/usr/bin/ruby
require 'logger'
require 'pragmatic_tokenizer'
require 'unicode_utils'
class Serbilian
SINGLE_LETTER_WORDS = {
"à" => "a",
"ã" => "ɐ̃",
"â" => "ɐ̃",