You can encrpt files using a private/public keys.
First, create the keys:
openssl req -x509 -nodes -days 100000 -newkey rsa:2048 \
-keyout private.pem -out public.pem -subj /
#!/usr/bin/python | |
# | |
# Usage: python paste_img.py dest_file.png | |
# | |
# This program readd the image stored in the clipboard, and dumps it into a file | |
import gtk, pygtk | |
pygtk.require('2.0') | |
import sys |
package: myapp.foo.locales | |
en: | |
mailbox: | |
header: | |
title: "Your mailbox" | |
subtitle: "Read and send messages" | |
welcome: "Welcome %{user}!" | |
actions: |
def g(n, center, amplitude, total, density) | |
Math.sinh(density*((n.to_f - total / 2.0))/(total/2.0))/Math.sinh(density) * amplitude + center | |
end | |
N = 30 | |
Density = 10 | |
prev_value = nil | |
(0..N).each do |n| | |
value = g(n, 35, 10, N, Density) | |
print "%3d %.4f" % [n, value] |
require "etc" | |
# Script used to launch servers, and track their status | |
groups = {} | |
pid = nil | |
uid = nil | |
ARGV.each do |argument| |
Inheritance is a key concept in most object-oriented languages, but applying it skillfully can be challenging in practice. Back in 1989, M. Sakkinen wrote a paper called Disciplined inheritance that addresses these problems and offers some useful criteria for working around them. Despite being more than two decades old, this paper is extremely relevant to the modern Ruby programmer.
Sakkinen's central point seems to be that most traditional uses of inheritance lead to poor encapsulation, bloated object contracts, and accidental namespace collisions. He provides two patterns for disciplined inheritance and suggests that by normalizing the way that we model things, we can apply these two patterns to a very wide range of scenarios. He goes on to show that code that conforms to these design rules can easily be modeled as ordinary object composition, exposing a solid alternative to tradi
#Overview drip is an awesome command line tool that can be used to dramatically lower perceived JVM startup time. It does this by preloading an entirely new JVM process\instance and allowing you to simply use the preloaded environment. This has extraordinary results with jruby.
We reduced time to run rake environment
from 13 seconds to a mere 3.5 seconds. This is actually at or near MRI 1.9.3p327 (with falcon patch) speeds!
Adding a few addition jruby options will reduce startup time even further (down to 1.69 seconds).
#Install Drip Install drip if you haven't already (see https://github.com/flatland/drip)
Disable "heads up" notifications in Android 7 | |
$ adb shell settings set global heads_up_notifications_enabled 0 |
Document moved to: https://github.com/servo/servo/blob/master/HACKING_QUICKSTART.md