Skip to content

Instantly share code, notes, and snippets.

View adrianharabula's full-sized avatar

Adrian Harabulă adrianharabula

View GitHub Profile
@adrianharabula
adrianharabula / pdfbook2.sh
Last active January 27, 2017 15:36
pdfbooklet2 - print booklets in linux
#!/usr/bin
# Generate booklet from pdffile
# -t. -b top,botom margins
# -o outer margin
# -i inner margin
# -s short edge (no page flip when printing)
pdfbook2 -s book.pdf -t 0 -b 0 -o 20 -i 50
@adrianharabula
adrianharabula / newsshkey.sh
Last active January 27, 2017 15:37
Generate new rsa ssh key
# generate ssh key
# public key file will be newkey.pub
# private key file will be newkey
ssh-keygen -f newkey
@adrianharabula
adrianharabula / Dockerfile
Created May 14, 2017 18:00 — forked from briceburg/Dockerfile
laravel 5 - running in a docker container
FROM alpine
ENV \
APP_DIR="/app" \
APP_PORT="80"
# the "app" directory (relative to Dockerfile) containers your Laravel app...
COPY app/ $APP_DIR
RUN apk add --update \
@adrianharabula
adrianharabula / export-gh-issues.sh
Last active June 5, 2017 16:34 — forked from toashd/export-gh-issues.sh
Export github issues to json
curl -u ':uname' 'https://api.github.com/repos/:org/:repo/issues' > issues.json
@adrianharabula
adrianharabula / export.rb
Created June 5, 2017 17:05
Export github issues with ruby octokit
require 'octokit'
require 'json'
# !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!!
# Instead, set and test environment variables, like below
client = Octokit::Client.new :access_token => ENV['MY_PERSONAL_TOKEN']
client.auto_paginate = true
issues = client.issues 'adrianharabula/condr', { :state => 'all' }
@adrianharabula
adrianharabula / branchestags.md
Last active June 15, 2017 15:39
Working with Git
@adrianharabula
adrianharabula / docker.sh
Last active July 10, 2017 05:36
Useful Docker lines
```
docker run --name=apache -d -p 80:80 -v /c/Work/httpd-vhosts.conf:/usr/local/apache2/conf/extra/httpd-vhosts.conf -v /c/Work/httpd.conf:/usr/local/apache2/conf/httpd.conf httpd:alpine
```
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<h2>Introdu venitul tău</h2>
@adrianharabula
adrianharabula / autossh
Created September 17, 2017 07:31
autossh startup script for openrc init on alpine linux
#!/sbin/openrc-run
#/etc/init.d/autossh
name="busybox $SVCNAME"
command="/usr/bin/autossh"
command_args="-M 0 -f -T -N connection"
command_user="root"
pidfile="/run/$SVCNAME/$SVCNAME.pid"
command_background="yes"
@adrianharabula
adrianharabula / Notes
Created December 28, 2017 18:42 — forked from matt40k/Notes
Install Github-pages on Raspberry PI
# Check GitHub pages required versions @ https://pages.github.com/versions/
# GitHub Pages info page:
# - https://github.com/blog/1581-cutting-the-github-pages-gem/
# - https://help.github.com/articles/using-jekyll-with-pages/
# Ruby is installed on Raspbian by default, but its only 1.9, we need at least 2.0
# Alas v2 isn't in the apt-get repo, but we can use the rvm to install it
# First we must add their GPG key
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3