Skip to content

Instantly share code, notes, and snippets.

Sampling process 84396 for 1 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling Adium (pid 84396) every 1 millisecond
Process: Adium [84396]
Path: /Applications/Adium.app/Contents/MacOS/Adium
Load Address: 0x100000000
Identifier: com.adiumX.adiumX
Version: 1.5.10 (1.5.10)
Code Type: X86-64
Parent Process: ??? [1]
[alias]
di = diff
co = checkout
br = branch
ci = commit
st = status
lg = log -p
unstage = reset HEAD --
last = log -1 HEAD
l = log --graph --pretty=format':%C(yellow)%h%Cblue%d%Creset %s %C(white) %an, %ar%Creset'
@febeling
febeling / how-to-set-up-stress-free-ssl-on-os-x.md
Last active August 29, 2015 14:27 — forked from jed/how-to-set-up-stress-free-ssl-on-os-x.md
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying

Lasst uns anfangen zu programmieren
indem wir Gesicht zeichnen
aus Kreisen
Um einen Kreis zu zeichnen brauchen wir den `ellipse` Befehl
Ich tippe also `ellipse` im Editor
@febeling
febeling / model.ex
Created December 7, 2016 15:51 — forked from alanpeabody/model.ex
Ecto change password w/ confirmation.
defmodule User do
use Ecto.Model
schema "users" do
field :email, :string
field :hashed_password, :string
field :password, :string, virtual: true
field :password_confirmation, virtual: true
timestamps
@febeling
febeling / storage_case.ex
Created September 17, 2017 15:25
Storage case to base tests for eventstore on
defmodule MyApp.StorageCase do
use ExUnit.CaseTemplate
setup do
Application.stop(:myapp)
Application.stop(:commanded)
Application.stop(:eventstore)
reset_eventstore()
reset_readstore()
@febeling
febeling / gist:3b9890e394b15ee127b48d6d76523f2d
Created January 2, 2018 15:55
(DBConnection.ConnectionError) tcp recv: closed
16:52:45.342 [error] GenServer {Commanded.Registration.LocalRegistry, {Commanded.Event.Handler, "issue"}} terminating
** (DBConnection.ConnectionError) tcp recv: closed
(ecto) lib/ecto/adapters/postgres/connection.ex:92: Ecto.Adapters.Postgres.Connection.execute/4
(ecto) lib/ecto/adapters/sql.ex:256: Ecto.Adapters.SQL.sql_call/6
(ecto) lib/ecto/adapters/sql.ex:542: Ecto.Adapters.SQL.struct/8
(ecto) lib/ecto/repo/schema.ex:547: Ecto.Repo.Schema.apply/4
(ecto) lib/ecto/repo/schema.ex:292: anonymous fn/14 in Ecto.Repo.Schema.do_update/4
(ecto) lib/ecto/repo/schema.ex:774: anonymous fn/3 in Ecto.Repo.Schema.wrap_in_transaction/6
(db_connection) lib/db_connection.ex:1366: DBConnection.transaction_nested/2
(db_connection) lib/db_connection.ex:1226: DBConnection.transaction_meter/3
@febeling
febeling / eject.md
Created April 18, 2018 08:02 — forked from dayhaysoos/eject.md
eject command for React Native

Reconfigure

If your project has any issues with the native folders, you can rebuild them by deleting both the ios and android directories at the root level of your project and running this command:

$ react-native eject

Running this command will check if the ios and android directories exist and then rebuild whichever one is missing.

The first time you run this command it will spit out a configuration JSON file called app.json. By default, app.json will have 2 properties:

# frozen_string_literal: true
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
current directory: /Users/febeling/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/thin-1.5.1/ext/thin_parser
/Users/febeling/.rbenv/versions/3.0.3/bin/ruby -I /Users/febeling/.rbenv/versions/3.0.3/lib/ruby/3.0.0 -r ./siteconf20220701-96982-dpb84s.rb extconf.rb
checking for main() in -lc... yes
creating Makefile
current directory: /Users/febeling/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/thin-1.5.1/ext/thin_parser
make DESTDIR\= clean
current directory: /Users/febeling/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0/gems/thin-1.5.1/ext/thin_parser
make DESTDIR\=