Skip to content

Instantly share code, notes, and snippets.

View tonyc's full-sized avatar
💭
wondering why github decided to add a user status

Tony Collen tonyc

💭
wondering why github decided to add a user status
View GitHub Profile
$ asdf install elixir 1.6.4
==> Checking whether specified Elixir release/reference exists...
==> Downloading 1.6.4 to /tmp/elixir_build_OLHwwt/elixir-precompiled-1.6.4.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 5052k 100 5052k 0 0 9715k 0 --:--:-- --:--:-- --:--:-- 9696k
==> Copying release into place
IO.inspect(quote do
defmodule QuoteTest do
def test(:foo), do: :foo
def test(:bar), do: :bar
def test(_), do: :anything
end
end)
### output
iex(3)> quote do
...(3)> &QuoteTest.test/1
...(3)> end
{:&, [],
[
{:/, [context: Elixir, import: Kernel],
[
{{:., [], [{:__aliases__, [alias: false], [:QuoteTest]}, :test]}, [], []},
1
]}
iex(3)> test_num = fn
x when is_number(x) and x < 0 ->
:negative
0 -> :zero
x when is_number(x) and x > 0 ->
:positive
end
#!/usr/bin/env bash
BASE_DIR="${HOME}/Pictures/uploads"
FILENAME=$(ls -1t ${BASE_DIR} | head -n 1)
FULL_PATH="${BASE_DIR}/${FILENAME}"
/usr/local/bin/aws s3 cp ${FULL_PATH} s3://pics.manero.org --acl public-read
URL="http://pics.manero.org/${FILENAME}"
echo ${URL} | xclip -in -selection clipboard
The "Repeater Detail" screen displays partially incorrect information when using a digital repeater from a memory channel.
This occurs on my TH-D74A with firmware version 1.05.
Steps to reproduce:
- Store a digital repeater into a conventional memory channel, e.g. "KC0WLB B":
UR: CQCQCQ
R2: KC0WLB G
Summary: Storing the CALL memory into the PRI slot uses incorrect display name
Steps to reproduce:
- Have several memory channels stored and named (e.g. 146.85 named "Test")
- In MR mode, rotate the encoder knob to a named memory channel, and note the channel you stopped at.
- Press [CALL]
- Press [F], [M.IN]
- Rotate the encoder knob before memory channel 0, to PRI, and press ENT.
- While still on the "Memory Channel List" screen, press [A/B] (aka DISPLAY) to display the channel name.
class User
has_one :plan
def has_feature?(name)
plan.has_feature? name
end
end
class Plan
has_many :line_items
util.puts: Use console.log instead
Didn't find a name for constructor
/usr/local/bin/jsctags:195
throw e;
^
Error: Didn't find a name for constructor
at errorWithCode (/usr/local/lib/cfa2/jscfa.js:157:11)
at Array.Aobj.toType (/usr/local/lib/cfa2/jscfa.js:1574:11)
at /usr/local/lib/cfa2/jscfa.js:1994:18
at /usr/local/lib/cfa2/jscfa.js:2022:39
ack gpsd libusb postgresql
ansible graphicsmagick libusb-compat proj
apple-gcc42 htop-osx libvo-aacenc protobuf
autoconf httpie libvorbis qt
automake iftop libvpx readline
avrdude imagemagick libxml2 redis
brew-cask ino libxslt s-lang
cmake irssi libyaml s3cmd
colordiff jbig2dec little-cms2 scons
coreutils jpeg lzlib sqlite