Skip to content

Instantly share code, notes, and snippets.

View leonardinius's full-sized avatar

Leonids Maslovs leonardinius

View GitHub Profile
@leonardinius
leonardinius / solutions.clj
Last active October 28, 2021 10:48
4clojure my solutions
;; http://www.4clojure.com/problem/1
;; Nothing but the Truth
;; Difficulty: Elementary Topics:
;; Description: This is a clojure form. Enter a value which will make the form evaluate to true. Don't over think it! If you are confused, see the getting started page. Hint: true is equal to true.
;; TestCases:
;; (= __ true)
true
;; http://www.4clojure.com/problem/2
apiVersion: backstage.io/v1alpha1
kind: API
metadata:
name: petstore-v2
description: The petstore API
tags:
- store-v2
- rest
spec:
type: openapi
@leonardinius
leonardinius / memory-test.ts
Created May 27, 2020 19:24 — forked from connorjclark/memory-test.ts
memory leak test
import { ChildProcess, spawn } from 'child_process';
import * as puppeteer from 'puppeteer';
const DEBUG = Boolean(process.env.DEBUG);
const CI = Boolean(process.env.CI);
const QUERY = Boolean(process.env.QUERY);
jest.setTimeout((QUERY ? 200 : 100) * 1000);
interface MemorySample {
@leonardinius
leonardinius / create_project.sh
Created September 7, 2012 16:43 — forked from shazow/create_project.sh
Setup deployment target for Nginx + Python/uWSGI + Supervisor + Git
#!/bin/bash
# Setup deployment target for Nginx + Python/uWSGI + Supervisor + Git
function usage() {
cat << EOF
Usage: $0 [-y] PROJECT_NAME [DOMAIN]
Options:
-y No prompts, assume yes to all.

axasas

@leonardinius
leonardinius / index.js
Created August 16, 2018 00:05
telegram-qr-bot-skeleton
const Telegraf = require('telegraf')
const Extra = require('telegraf/extra')
const QrCode = require('qrcode-reader')
const Jimp = require('jimp')
const bot = new Telegraf(process.env.BOT_TOKEN)
bot.use(Telegraf.log())
bot.catch(err => {
console.log('Ooops', err)

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@leonardinius
leonardinius / 2017-06-example-sketch.png
Last active June 16, 2017 23:51
gitgraph.js sketch sample
2017-06-example-sketch.png
@leonardinius
leonardinius / bluejeans_rpm_via_alien.md
Created June 8, 2017 13:10 — forked from johnduarte/bluejeans_rpm_via_alien.md
BlueJeans rpm install on Debian

FYI, for those of us not running Debian based systems rather than RedHat, the BlueJeans RPM can be successfully installed via alien

Steps to install BlueJeans on Debian

  • Download BlueJeans RPM
  • Install alien package sudo apt-get install alien
  • Convert BlueJeans RPM to a DEB package sudo alien --to-deb bluejeans-*.rpm
  • Install resulting DEB sudo dpkg -i bluejeans_*.deb
  • Run BlueJeans with /opt/bluejeans/bluejeans-bin

You may get an error loading the expected udev library

gitolite gitolite/gituser string git
gitolite gitolite/gitdir string /home/git
gitolite gitolite/adminkey string ssh-dss aaaaaaa