Skip to content

Instantly share code, notes, and snippets.

View AbhimanyuAryan's full-sized avatar
:atom:
transformers

Abhimanyu Aryan AbhimanyuAryan

:atom:
transformers
View GitHub Profile
@AbhimanyuAryan
AbhimanyuAryan / stars.jl
Created September 1, 2022 14:00 — forked from gdalle/stars.jl
Counting stars for Julia packages
using CSV
using GitHub
using Pkg
using ProgressMeter
using TOML
myauth = GitHub.authenticate(ENV["GITHUB_AUTH"])
general = first(reg for reg in Pkg.Registry.reachable_registries() if reg.name == "General")
package_url = Dict{String,String}()
using Merly
@page "/" HTTP.Response(200,"Hello World from Merly!")
@page "/hello/:user" HTTP.Response(200,string("<b>Hello ",request.params["user"],"!</b>"))
@route POST "/post" HTTP.Response(200,"I did something!")
start(host = "127.0.0.1", port = 8086, verbose = true)
using Bukdu
struct WelcomeController <: ApplicationController
conn::Conn
end
struct RestController <: ApplicationController
conn::Conn
end
@AbhimanyuAryan
AbhimanyuAryan / firefox-about-config-privacy.md
Last active March 21, 2022 03:50 — forked from 0XDE57/config.md
Firefox about:config privacy settings

ABOUT

about:config settings to harden the Firefox browser. Privacy and performance enhancements.
To change these settings type 'about:config' in the url bar. Then search the setting you would like to change and modify the value. Some settings may break certain websites from functioning and rendering normally. Some settings may also make firefox unstable.

I am not liable for any damages/loss of data.

Not all these changes are necessary and will be dependent upon your usage and hardware. Do some research on settings if you don't understand what they do. These settings are best combined with your standard privacy extensions (HTTPS Everywhere, NoScript/Request Policy, uBlock origin, agent spoofing, Privacy Badger etc), and all plugins set to "Ask To Activate".

@AbhimanyuAryan
AbhimanyuAryan / gf_stats.sql
Created March 7, 2022 12:14
genieframework downloads
SELECT SUM(request_count) from stats WHERE package_name IN('Genie',
'SearchLight',
'Stipple',
'StippleCharts',
'StippleUI',
'StipplePlotly',
'SearchLightMySQL',
'SearchLightPostgreSQL',
'GenieAuthentication',
'SearchLightSQLite',
@AbhimanyuAryan
AbhimanyuAryan / .bashrc
Created February 21, 2022 12:19
bashrc configurations
# exa to ls
alias l='exa'
alias la='exa -a'
alias ll='exa -lah'
alias ls='exa --grid --color=auto --icons'
# bat alias to cat
alias cat='bat'
@AbhimanyuAryan
AbhimanyuAryan / pluto_bug.jl
Created February 10, 2022 14:09
pluto notebook bug
### A Pluto.jl notebook ###
# v0.18.0
using Markdown
using InteractiveUtils
# ╔═╡ b2667ebb-10d4-4233-804d-589f3d108dc6
# hideall
using Revise
@AbhimanyuAryan
AbhimanyuAryan / julia_for_pythonistas.ipynb
Created December 19, 2021 17:13
Julia_for_Pythonistas.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Julia 6 hrs 59 mins ██████████████████▏░░ 86.3%
Markdown 34 mins █▌░░░░░░░░░░░░░░░░░░░ 7.2%
Docker 10 mins ▍░░░░░░░░░░░░░░░░░░░░ 2.3%
Git Config 9 mins ▍░░░░░░░░░░░░░░░░░░░░ 1.9%
HTML 5 mins ▏░░░░░░░░░░░░░░░░░░░░ 1.2%

Deploying Julia on heroku

Let's assume that you can run your web server on your own computer, and that you can open it in your own browser (through localhost or 127.0.0.1). This guide will go through the steps of putting that app online!

This guide will be based on a hello world sample project that uses Genie.jl, but the steps from this guide apply to any Julia web framework.

heroku has tons of features, but for a simple app, we only need the basics. In particular, we do not need the heroku command line, we can do everything through the online GUI.

Basics

heroku uses git for deployment: to package your app, you create a git repository, and to put a new version of your app online, you push to the git repository. If you already know git, then you now know how to manage a web server! It's like GitHub pages, but more powerful (and more complicated). Read heroku's introduction for a basi