Skip to content

Instantly share code, notes, and snippets.

colorscheme default
:set number
:set relativenumber
" Install pathogen
""mkdir -p ~/.vim/autoload ~/.vim/bundle && \
""curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
" Install vim-elixir
@vdeemann
vdeemann / modules_and_functions_6.exs
Last active December 12, 2024 00:22
programming-elixir-1.6-chapter-6
defmodule Chop do
def guess(actual, range), do: guess_conditional(actual, range, div(Range.size(range),2))
def guess_conditional(actual, range, current_guess) do
if actual > 0 and actual <= Range.size(range) do
guess_helper(actual, range, current_guess)
end
end
def guess_helper(actual, _, current_guess) when current_guess == actual do
"#{current_guess}"
end
1.) Open your current Firefox Profile folder
a.) On the Firefox address bar type about:support
b.) Folder path is in “Profile Folder” section, use that and navigate to it
2.) create a folder called chrome (if it doesnt exist)
3.) go into created folder and create a userChrome.css file
4.) In userChrome.css paste in code from:
(use the gist snippet below)
5.) activate custom stylesheets in Firefox:
public class Puzzle4 {
public static void main(String [] args) {
Value [] values = new Value[6];
int number = 1;
int i = 0;
while (i < 6) {
values[i] = new Value();
// 0-1 1-10 2-100 3-1000 4-10000 5-100000 6-
values[i].intValue = number;
// 0-10 1-100 2-1000 3-10000 4-100000 5-1000000 6-
class Triangle {
double area;
int height;
int length;
public static void main(String[] args) {
int x = 0;
Triangle [] ta = new Triangle[4];
while (x<4) {
ta[x] = new Triangle();
public class EchoTestDriveBonus {
public static void main(String[] args) {
Echo e1 = new Echo();
Echo e2 = e1;
int x = 0;
while (x<4) {
e1.hello();
// 0-1 1-2 2-4 3-11
e1.count = e1.count + 1;
if (x>0) {
public class EchoTestDrive {
public static void main(String[] args) {
Echo e1 = new Echo();
Echo e2 = new Echo();
int x = 0;
while (x<4) {
e1.hello();
// 0-1 1-2 2-3 3-4
e1.count = e1.count + 1;
if (x>0) {
import java.util.*;
public class PoolPuzzleOne {
public static void main(String[] args) {
int x = 0;
while(x<4) {
System.out.print("a");
if (x<1) {
System.out.print(" ");
}
@vdeemann
vdeemann / leap.rkt
Created April 4, 2024 21:16
exercism Scheme exercises
#lang racket
(require racket/trace)
(define (leap-year? year)
(if (and (and (div-by-4? year) (div-by-100? year)) (div-by-400? year)) #t
(if (and (div-by-4? year) (not (div-by-100? year))) #t #f)))
(define (div-by-4? year)
(if (= (modulo year 4) 0) #t #f))
brew install elixir
mix archive.install hex phx_new
mix phx.new demo
################
# postgresql development environment setup
# https://www.highgo.ca/2023/06/23/setup-postgresql-development-environment-on-macos/
brew install git
brew install icu4c