Skip to content

Instantly share code, notes, and snippets.

View er1z's full-sized avatar

Przemysław eRIZ Pawliczuk er1z

View GitHub Profile
@j4mie
j4mie / gist:1778918
Created February 9, 2012 09:46
# How to run Sentry in a subdirectory (http://your.server.com/sentry/) with nginx

How to run Sentry in a subdirectory with nginx

Scenario: you already have an app running at http://your.server.com/ and you want to run Sentry at http://your.server.com/sentry/

I spend a few hours banging my head against this, and finally got it to work. There may be a better way, but I couldn't find it.

Warning: hacky.

nginx.conf (in server stanza)

@aseemk
aseemk / README.md
Last active February 14, 2018 16:41
A bookmarklet for "selecting all" (technically, "toggling all") checkboxes on the Amazon AWS S3 console.
Niektórzy niemądrzy ludzie
Pyski maczają w wódzie
Ja się w wódce nie lubuję !
Co innego proponuję.
Cóż to może być, spytacie ?
Czy o piwie mówisz bracie ?
Ani piwo, ani wódka
Która jest jak szczurza trutka !
@bastman
bastman / build.properties
Created October 8, 2013 16:29
phing example tasks
project.environment.name=local
project.name=${phing.project.name}
dir.build_xml=${project.basedir}
project.host.default=${project.environment.name}.${project.name}.mydomain.com
dir.project=${dir.build_xml}/../../..
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@thomasfr
thomasfr / autossh.service
Last active May 9, 2024 16:59
Systemd service for autossh
[Unit]
Description=Keeps a tunnel to 'remote.example.com' open
After=network.target
[Service]
User=autossh
# -p [PORT]
# -l [user]
# -M 0 --> no monitoring
# -N Just open the connection and do nothing (not interactive)
@jwage
jwage / Cartesian.php
Created April 22, 2014 20:30
PHP Cartesian Function
<?php
$attributeValues = array(
'color' => array('Red', 'White', 'Blue'),
'size' => array(1, 2, 3, 4),
'fabric' => array('Cloth', 'Silk')
);
class Cartesian
{
@pjdietz
pjdietz / cloudSettings
Last active June 18, 2020 22:29
Testing Protected Method of Abstract Class with PHPUnit
{"lastUpload":"2020-06-18T22:29:09.889Z","extensionVersion":"v3.4.3"}
@aerth
aerth / ufw-secure.sh
Created January 12, 2016 22:02
Hardened UFW rules (you customize)
#!/bin/bash
# this lil script was created by aerth at Earthbot.net
# run this to clear your ufw rules and replace with this default medium-high security!
# reset firewall
ufw reset
@PieterScheffers
PieterScheffers / start_docker_registry.bash
Last active October 29, 2023 18:26
Start docker registry with letsencrypt certificates (Linux Ubuntu)
#!/usr/bin/env bash
# install docker
# https://docs.docker.com/engine/installation/linux/ubuntulinux/
# install docker-compose
# https://docs.docker.com/compose/install/
# install letsencrypt
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04