Skip to content

Instantly share code, notes, and snippets.

@jsn
jsn / global-deps.edn
Last active December 26, 2019 02:01
my clojure repl setup
{
:aliases {
:deps {:extra-deps
{org.clojure/tools.deps.alpha {:mvn/version "0.6.474"}}}
:dev {:extra-paths ["/home/jason/.clojure/my-dev"]
:extra-deps
{com.bhauman/rebel-readline {:mvn/version "0.1.4"}
nrepl/nrepl {:mvn/version "0.6.0"}
cider/cider-nrepl {:mvn/version "0.21.1"}}
:main-opts ["-m" "myrepl"]}

Simpler-than-Pilaf Baked Rice

  • MAKES: 4 servings
  • TIME: 30 minutes

This basic, valuable technique is a combination of pilaf and paella but simpler than either, especially if you omit the spices and go with just salt and pepper. See "15 Ingredients to Stir Into Rice Pilaf or Simpler-than-Pilaf Baked Rice" (page 461) for ideas too.

Tomato and Cheese Frittata

MAKES: 4 servings

TIME: 30 minutes

All sorts of vegetables can be used here. See the variations and the list that follows.

  1. 2 tablespoons extra virgin olive oil
  2. 1/2 onion, sliced
jason@jsn cr $ head -n1000 z.cr z2.cr
==> z.cr <==
def q
puts "in q"
1
end
Q = q()
class Z
jason@jsn cr $ crystal z2.cr
in class method for x
2018-02-09 03:17:03 +03:00
before
in class method for y
in class
out of class
after
jason@jsn cr $ head -n 1000 z.cr z2.cr
==> z.cr <==
jason@jsn cr $ head -n 1000 z.cr z2.cr
==> z.cr <==
class Z
def self.f
puts "in class method"
return Time.now
end
@@x : Time = f()
@jsn
jsn / a.cr
Created October 30, 2017 18:37
def check(l)
abba = false
l.scan(/([a-z])([a-z])\2\1/) do |rm|
next if $1 == $2
return false if rm.pre_match =~ /\[[^\]]*$/
abba = true
end
!!abba
end
@jsn
jsn / s.cr
Created October 19, 2017 18:20
crystal lang *Server bug
# compile with --release, connect with netcat: nc localhost 12300, try multiple times
require "socket"
TCPServer.new(12300, reuse_port: true).accept.puts "hi"
@jsn
jsn / subs.rb
Created July 9, 2017 20:25
Mokum reciprocative autosubscriber
#! /usr/bin/env ruby
require 'uri'
require 'net/http'
require 'json'
class Mukom < Net::HTTP
BASE = URI.parse 'https://mokum.place/api/v1/'
attr_accessor :api_key
#include <stdio.h>
#include <stdlib.h>
#define N 26
#define LEN (N * 2 + 1)
static int s[LEN] ;
static void print_s(void) {
for (int i = 0; i < LEN; i ++)