Skip to content

Instantly share code, notes, and snippets.

@jyr
jyr / psqlfix.txt
Last active April 25, 2024 21:29
Change postgres default template0 to UTF8 encoding
http://blog.desgrange.net/2012/06/05/caldav-carddav-debian-davical-ios-ical.html
mike@rbci:~$ psql -U postgres
psql (9.0.3)
Type "help" for help.
postgres=# update pg_database set datallowconn = TRUE where datname = 'template0';
UPDATE 1
postgres=# \c template0
You are now connected to database "template0".
"""
En una ventana muestra 7 vistas seleccionadas desde una barra de herramientas
"""
from Foundation import *
from AppKit import *
import objc
class DashboardController (NSViewController):
// Init style shamelessly stolen from jQuery http://jquery.com
var Froogaloop = (function(){
// Define a local copy of Froogaloop
function Froogaloop(iframe) {
// The Froogaloop object is actually just the init constructor
return new Froogaloop.fn.init(iframe);
}
var eventCallbacks = {},
hasWindowEvent = false,
@jyr
jyr / install-go-to-with-bash-script.md
Created May 22, 2018 14:40 — forked from d2s/install-go-to-with-bash-script.md
Installing Go with command line

Install Go language with a Bash script

Another alternative to installing Go is to use a simple Bash script. It will download and install Go language under of your own user account.

Note that a system-wide installation might be better for some things (for example, better protected from accidental modifications etc.), but this was a bit simpler to setup.

For this example, we are using:

@jyr
jyr / Dockerfile
Created December 3, 2017 15:39 — forked from yefim/Dockerrun.aws.json
Build a Docker image, push it to AWS EC2 Container Registry, then deploy it to AWS Elastic Beanstalk
# Example Dockerfile
FROM hello-world
attachments: parent_id, asset_id
domain_names: organisation_id
event_memberships: user_id, event_id
events: editor_id
group_actions: user_id, group_id
groups: user_id
icons: parent_id
invitations: sender_id
legacy_actions: item_upon_id
news_items: author_id
@jyr
jyr / my.cnf
Last active March 19, 2016 03:20
my.cnf on MNPP
# Example MySQL config file for small systems.
#
# This is for a system with little memory (<= 64M) where MySQL is only used
# from time to time and it's important that the mysqld daemon
# doesn't use much resources.
#
# MySQL programs look for option files in a set of
# locations which depend on the deployment platform.
# You can copy this option file to one of those
# locations. For information about these locations, see:
@jyr
jyr / gist:3eaccaec28ec2a7f8cf4
Created March 8, 2016 04:46 — forked from anonymous/gist:9388472
Summing up contextual influence on systems architecture
1. Monolithic applications and architectures can vary in their monolithness. This is an under-specified description.
2. Microservice applications and architectures can vary in their microness. This is an under-specified description.
3. Microservices and monolithic architectures have both benefits and disadvantages.
4. Organizations will exploit those benefits while working around any weaknesses.
5. Success of the business is a large influence on the exploitation of benefits and implementation and costs of workarounds.
6. All benefits and work arounds are context-sensitive. Meaning that they are both technically and socially constructed by the organization that navigates them.
7. Path dependency is a thing. History matters and manifests in these architectural decisions and evolution in an organization.
8. Patterns exist to inform practice, not dictate it. Zealous adherence to an architectural pattern brings peril when it is to the exclusion of cultural context in actual practice.
9. Architectural patterns w
@jyr
jyr / gist:7876902
Created December 9, 2013 18:01
spree
At this point, if you are using spree_auth_devise you will need to change this line in config/initializers/spree.rb:
Spree.user_class = "Spree::LegacyUser"
To this:
Spree.user_class = "Spree::User"
@jyr
jyr / autossh.sh
Created November 16, 2013 06:31
Autossh
autossh -M 2200 -p22 -N -D 9999 user@domain.com