Skip to content

Instantly share code, notes, and snippets.

View ericentin's full-sized avatar

Eric Entin ericentin

View GitHub Profile

Keybase proof

I hereby claim:

  • I am ericentin on github.
  • I am ericentin (https://keybase.io/ericentin) on keybase.
  • I have a public key whose fingerprint is E17E 484D 90F7 6C4D 6769 5921 D13B 7997 832C 4B25

To claim this, I am signing this object:

This file has been truncated, but you can view the full file.
eric@ubuntu:/media/sf_Code/plug$ strace -f -e trace=file mix compile
execve("/media/sf_Code/elixir/bin/mix", ["mix", "compile"], [/* 21 vars */]) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/x86_64-linux-gnu/libc.so.6", O_RDONLY|O_CLOEXEC) = 3
open("/usr/lib/locale/locale-archive", O_RDONLY|O_CLOEXEC) = 3
execve("/media/sf_Code/elixir/bin/elixir", ["elixir", "/media/sf_Code/elixir/bin/mix", "compile"], [/* 21 vars */]) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
@ericentin
ericentin / mix.exs
Created November 20, 2015 00:57
exrm exjsx issue
defmodule ExrmExjsx.Mixfile do
use Mix.Project
def project do
[app: :exrm_exjsx,
version: "0.0.1",
elixir: "~> 1.1",
build_embedded: Mix.env == :prod,
start_permanent: Mix.env == :prod,
deps: deps]
defmodule KeysToAtoms do
def keys_to_atoms(%{} = map) do
Enum.map(body, &{String.to_atom(&1), keys_to_atoms(&2)})
|> Enum.into(%{})
end
def keys_to_atoms(list) when is_list(list) do
Enum.map(list, &keys_to_atoms/1)
end
@ericentin
ericentin / migrate.sh
Last active October 9, 2023 09:28
How to run Ecto migrations from an exrm release
./bin/turbo rpc Elixir.Ecto.Storage up "['Elixir.Turbo.Repo']."
./bin/my_app rpc Elixir.Mix.Ecto migrations_path "['Elixir.MyApp.Repo']."
# => <<"/opt/my_app/production/rel/my_app/lib/my_app-0.0.1/priv/repo/migrations">>
./bin/my_app rpc Elixir.Ecto.Migrator run "['Elixir.MyApp.Repo', <<\"/opt/my_app/production/rel/my_app/lib/my_app-0.0.1/priv/repo/migrations\">>, up, [{all, true}]]."
# => []
root@turbo-base:/opt/turbo/production/rel/turbo/bin# ./turbo rpc Ecto.Migrator run "['Elixir.Turbo.Repo', <<\"/opt/turbo/production/rel/turbo/lib/turbo-0.0.1/priv/repo/migrations\">>, up, [{all, true}]]."
RPC to 'turbo@127.0.0.1' failed: {'EXIT',
{undef,
[{'Ecto.Migrator',run,
['Elixir.Turbo.Repo',
<<"/opt/turbo/production/rel/turbo/lib/turbo-0.0.1/priv/repo/migrations">>,
up,
[{all,true}]],
[]},
{rpc,'-handle_call_call/6-fun-0-',5,
{
"auto_complete_commit_on_tab": true,
"bold_folder_labels": true,
"color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme",
"ensure_newline_at_eof_on_save": true,
"font_options":
[
"subpixel_antialias"
],
"font_size": 11,
"build_systems":
[
{
"name": "cake build:dotnet",
"cmd": ["cake.cmd", "-u", "-o", "C:\\Consumer-Facing\\standard\\Standard.Web\\publishers\\boston\\mobileApp", "build:dotnet"]
}
]
@ericentin
ericentin / gist:1173758
Created August 26, 2011 16:04
perlin noise background
<!DOCTYPE html>
<html>
<head>
<title>perlin noise background</title>
<style type="text/css">
body {
background: url(#background);
margin: 0;
}
</style>
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include "gdsl.h"
typedef struct _Block {
// Important key member
int key;
// Rest of the stuff...
int foo, bar, baz;