Skip to content

Instantly share code, notes, and snippets.

View spacegangster's full-sized avatar
💭
Working on Lightpad.ai

Ivan Fedorov spacegangster

💭
Working on Lightpad.ai
View GitHub Profile
@spacegangster
spacegangster / nginx.conf
Last active August 29, 2015 14:25 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
This file has been truncated, but you can view the full file.
/9j/4AAQSkZJRgABAgEAYABgAAD/4QwtRXhpZgAATU0AKgAAAAgABwEyAAIAAAAUAAAAYkdGAAMA
AAABAAUAAEdJAAMAAAABAFgAAIKYAAIAAAAWAAAAdpydAAEAAAAUAAAAAOocAAcAAAfSAAAAAIdp
AAQAAAABAAAAjAAAAPYyMDA5OjAzOjEyIDEzOjQ4OjIzAE1pY3Jvc29mdCBDb3Jwb3JhdGlvbgAA
BZADAAIAAAAUAAAAzpAEAAIAAAAUAAAA4pKRAAIAAAADMDgAAJKSAAIAAAADMDgAAOocAAcAAAe0
AAAAAAAAAAAyMDA4OjAyOjExIDExOjMyOjI0ADIwMDg6MDI6MTEgMTE6MzI6MjQAAAUBAwADAAAA
AQAGAAABGgAFAAAAAQAAATgBGwAFAAAAAQAAAUACAQAEAAAAAQAAAUgCAgAEAAAAAQAACt0AAAAA
AAAASAAAAAEAAABIAAAAAf/Y/+AAEEpGSUYAAQEAAAEAAQAA/9sAQwAQCwwODAoQDg0OEhEQExgo
GhgWFhgxIyUdKDozPTw5Mzg3QEhcTkBEV0U3OFBtUVdfYmdoZz5NcXlwZHhcZWdj/9sAQwEREhIY
FRgvGhovY0I4QmNjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2Nj
Y2Nj/8AAEQgAeACgAwEiAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//E
@spacegangster
spacegangster / Query.js
Created April 8, 2016 19:10
Партизанские запросы к Огниву
// Первым делом нужно получить куку ring-session
// Выполните запрос вида:
var auth_response = $.post('/user/signin', {username: "test", password: "test"});
// Придёт JSON-ответ вида {status: "ok", redirect_url: null}.
// Кука будет содержаться в заголовках ответа. Дальнейшие запросы должны содержать эту куку.
// Далее нужно получить т.н. начальные данные:
var initial_data = $.get('/rest/firs')
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
function _helperPluginUtils() {
const data = require("@babel/helper-plugin-utils");

Keybase proof

I hereby claim:

  • I am spacegangster on github.
  • I am spacegangster (https://keybase.io/spacegangster) on keybase.
  • I have a public key ASBcpD-OPG3YQxM-E_m9qD9j97TQ6NYyb5mwssBeEIqD6go

To claim this, I am signing this object:

@spacegangster
spacegangster / examples.edn
Last active July 10, 2019 09:35
Crux Console examples
[{:title "Space Stocks"
:query {:find [e]
:where [[e :crux.db/id _]]}}
{:title "Add space stocks"
:query [[:crux.tx/put {:crux.db/id 33 :title "Company 3"}]]}]
[:dev] Compiling ...
[:dev] Build failure:
failed to convert sources
{:tag :shadow.build.closure/convert-error, :sources [[:shadow.build.classpath/resource "website/js-main.js"]]}
ExceptionInfo: failed to convert sources
shadow.build.closure/convert-sources*/fn--11183 (closure.clj:1462)
shadow.build.closure/convert-sources* (closure.clj:1432)
shadow.build.closure/convert-sources* (closure.clj:1315)
shadow.build.closure/convert-sources (closure.clj:1649)
@spacegangster
spacegangster / timezones.edn
Last active July 15, 2020 14:52
List of standard timezones, scraped from a popular mailing service
;; UPD hey, I'm not sure now if those zones are correct throughout the year
;; see this https://www.creativedeletion.com/2015/01/28/falsehoods-programmers-date-time-zones.html
;; Sorry for misleading you
[{:option/value "Pacific/Tarawa" :option/label "(GMT +12:00) Tarawa"}
{:option/value "Pacific/Auckland" :option/label "(GMT +12:00) New Zealand Time"}
{:option/value "Pacific/Norfolk" :option/label "(GMT +11:00) Norfolk Island (Austl.)"}
{:option/value "Pacific/Noumea" :option/label "(GMT +11:00) Noumea, New Caledonia"}
{:option/value "Australia/Sydney" :option/label "(GMT +10:00) Australian Eastern Time (Sydney)"}
{:option/value "Australia/Queensland" :option/label "(GMT +10:00) Australian Eastern Time (Queensland)"}
{:option/value "Australia/Adelaide" :option/label "(GMT +9:30) Australian Central Time (Adelaide)"}
@spacegangster
spacegangster / rrule.cljc
Last active April 4, 2021 13:24
Parsing and spec-ing recurrence rule rules in Clojure
(ns rrule.rrule
"Parse RRULE as in
https://icalendar.org/iCalendar-RFC-5545/3-3-10-recurrence-rule.html
https://tools.ietf.org/html/rfc5545#section-3.3.10
;; Links ;;
https://github.com/dmfs/lib-recur
https://github.com/jcvanderwal/google-rfc-2445
https://github.com/mangstadt/biweekly
https://github.com/ical4j/ical4j"
@spacegangster
spacegangster / user.clj
Last active March 24, 2022 12:16
Getting call graph (vars structure) in Clojure
(ns user)
; Hey, I've been playing a bit with graphing out the structure of a module for Lightpad.
; It worked well, I've found the target function that I'll need change to add a new feature.
; Tweet with a screenshot https://twitter.com/spacegangster/status/1324760381735272450
; lein coordinate
; [com.gfredericks/clj-usage-graph "0.3.0"]
; https://github.com/gfredericks/clj-usage-graph