Skip to content

Instantly share code, notes, and snippets.

@datanoise
datanoise / crystal-tags.cr
Last active March 5, 2021 03:24
ctags for crystal language
require "compiler/crystal/**"
require "option_parser"
include Crystal
class ToCtagsVisitor < Visitor
@filename : String
@lines : Array(String)
@io : IO
@opts : Generator
Process: iTerm2 [53116]
Path: /Applications/iTerm2.app/Contents/MacOS/iTerm2
Identifier: com.googlecode.iterm2
Version: 3.0.20170205 (3.0.20170205)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: iTerm2 [53116]
User ID: 501
Date/Time: 2017-02-07 20:46:55.075 -0500
## Environment
```
Bundler 1.14.2
Rubygems 2.6.8
Ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-darwin16]
Git 2.11.0
Platform x86_64-darwin-16
```
```
source 'https://rubygems.org'
gem 'rails', '5.0.1'
gem 'mysql2'
gem 'bcrypt'
gem 'jbuilder'
gem 'progress'
gem 'prawn'
gem 'prawn-table'
gem 'prawn-svg'
@datanoise
datanoise / # weechat - 2017-01-02_11-51-35.txt
Created January 2, 2017 16:51
weechat on macOS 10.12.2 - Homebrew build logs
Homebrew build logs for weechat on macOS 10.12.2
Build date: 2017-01-02 11:51:35
@datanoise
datanoise / gist:7878089
Created December 9, 2013 18:41
NTPClient
package main
import (
"fmt"
"net"
"time"
)
func SntpNow(host string) (*time.Time, error) {
raddr, err := net.ResolveUDPAddr("udp", host+":123")
@datanoise
datanoise / gist:7090502
Created October 21, 2013 20:34
Slow stream example
File.open!("/usr/share/dict/words") |> IO.stream(:line) |> Enum.max_by(&String.length/1)
@datanoise
datanoise / gist:1953678
Created March 1, 2012 22:25
brew install luarocks still fails
$ brew install --use-clang luarocks
==> Downloading http://luarocks.org/releases/luarocks-2.0.7.1.tar.gz
######################################################################## 100.0%
==> Patching
patching file src/luarocks/fs/lua.lua
Hunk #1 succeeded at 633 (offset 14 lines).
==> ./configure --prefix=/usr/local/Cellar/luarocks/2.0.7.1 --rocks-tree=/usr/lo
cal --sysconfdir=/usr/local/et
==> make
for f in luarocks luarocks-admin ;\\
@datanoise
datanoise / gist:1944640
Created February 29, 2012 21:40
brew install luarocks
$ brew install --use-clang luarocks
==> Downloading http://luarocks.org/releases/luarocks-2.0.7.1.tar.gz
File already downloaded in /Users/kent/Library/Caches/Homebrew
==> Patching
patching file src/luarocks/fs/lua.lua
Hunk #1 succeeded at 633 (offset 14 lines).
==> ./configure --prefix=/usr/local/Cellar/luarocks/2.0.7.1 --rocks-tree=/usr/lo
cal --sysconfdir=/usr/local/et
==> make
for f in luarocks luarocks-admin ;\\
@datanoise
datanoise / gist:1622062
Created January 16, 2012 18:03
Installing russian layout with yo
1. Download Russian_yo.keylayout from http://cl.ly/0d1S451w26260Z1I0k1X
2. Copy it into ~/Library/Keyboard\ Layouts folder
3. Open System Preferences/Language & Text/Input Sources and select 'Russian - Yo' layout
4. Ё is located on the place of tilda(~), so you would have to give up on squire brackets characters
Note I didn't bother with attaching an icon for this layout. You can do it yourself with Ukelele utility.
Enjoy.