Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Building

Arsh Sharma Sov-trotter

:octocat:
Building
View GitHub Profile
@Sov-trotter
Sov-trotter / init.vim
Created Dec 15, 2020 — forked from TheCedarPrince/init.vim
My (neo)Vim Configuration File
View init.vim
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" VIM SETTINGS
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" TURNS LINE NUMBERING ON
set nu
" trigger `autoread` when files changes on disk
set autoread
autocmd FocusGained,BufEnter,CursorHold,CursorHoldI * if mode() != 'c' | checktime | endif
View test_layers.jl
using Revise, Javis, Animations, Colors
function ground(args...)
background("white")
sethue("black")
end
function ground2(args...)
background("orange")
sethue("blue")
View julia-bouncing-balls-animation.jl
#!/usr/bin/env julia
using Luxor, Colors, Combinatorics
mutable struct Ball
id::Int
position::Point
velocity::Point
color::Color
ballradius::Float64
View balls-collision_javis.jl
# const panewidth = video.width/2
# const paneheight = video.height/2
# asqu(args...; do_action=:stroke) = box(Point(0,0), 50, 50, 0,do_action)
# # using Luxor, Colors, Combinatorics
# mutable struct Ball
# position::Point
# velocity::Point
# color::Color
# ballradius::Float64
View test_predefined_objects.jl
using Revise, Javis, Animations
function ground(args...)
background("white")
sethue("black")
end
video = Video(800, 800)
Background(1:70, ground)
View morph_modes.jl
using Revise, Javis
function ground(args...)
background("black")
sethue("white")
end
abox(args...; do_action=:stroke) = rect(-50,-50, 100, 100, do_action)
acirc(args...; color = "red", do_action=:stroke) = circle(Point(0, 0), 50, do_action)
View test_morph.jl
using Revise, Javis
function ground(args...)
background("black")
sethue("white")
end
astar(args...; do_action=:stroke) = star(O, 50, 5, 0.5, 0, do_action)
abox(args...; do_action=:stroke) = rect(-50,-50, 100, 100, do_action)
acirc(args...; color = "red", do_action=:stroke) = circle(Point(0, 0), 50, do_action)