Skip to content

Instantly share code, notes, and snippets.

View jellykells's full-sized avatar
💭
getting distracted

JayKay jellykells

💭
getting distracted
  • Behind you
View GitHub Profile
@jrom
jrom / nginx.conf
Created February 7, 2012 17:14
nginx hack for multiple conditions
if ($request_uri = /) {
set $test A;
}
if ($host ~* teambox.com) {
set $test "${test}B";
}
if ($http_cookie !~* "auth_token") {
set $test "${test}C";
@aeris
aeris / clip.py
Created August 9, 2012 23:21
Copy/paste from command line with Klipper
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
import argparse, dbus, sys
bus = dbus.SessionBus()
klipper = bus.get_object('org.kde.klipper', '/klipper')
@PurpleBooth
PurpleBooth / README-Template.md
Last active July 22, 2024 02:29
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@virtualdreams
virtualdreams / goaccess.service
Created April 4, 2017 15:16
goaccess systemd service
[Unit]
Description=Goaccess Web log report.
After=network.target
[Service]
Type=simple
User=root
Group=root
Restart=always
ExecStart=/usr/local/bin/goaccess -a -g -f /var/log/nginx/access.log -o /srv/www/goaccess/index.html --real-time-html --ws-url <your url>
@tavinus
tavinus / nextcloud-onlyoffice.md
Last active November 2, 2023 20:27
debian 8 + nextcloud + onlyoffice + nginx + mariadb + redis + rabbitmq

debian 8 + nextcloud + onlyoffice + nginx + mariadb + redis + rabbitmq

How to run everything on a single Debian install

About

This guide was compiled from the notes and logs of two re-installs
I made on Debian 8 (Jessie) servers running Owncloud on Apache.

I have basically removed and reinstalled everything except the database
contents and the users files, while also migrating from owncloud to nextcloud.

@jellykells
jellykells / Update Local Branches From Remote
Created May 6, 2019 07:18
I was having an issue where Atom wouldn't list all the branches in a repository I cloned. This updates every local branch from it's remote tracking branch. Credit to Wookie88 on stackoverflow https://stackoverflow.com/a/10312587
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
@jellykells
jellykells / View Hyper-V Snapshot Merge Status
Created May 6, 2019 07:20
Run the following command in PowerShell to view a Hyper-V Snapshot Merge Status, including the percentage complete.
get-wmiobject -namespace “root\virtualization” -Query “select * from Msvm_ConcreteJob” | Where {$_.ElementName -eq ‘Merge in Progress’}
@iliakonnov
iliakonnov / apache.scc
Created March 19, 2020 17:19
sloc in chromium and in other projects
───────────────────────────────────────────────────────────────────────────────
Language Files Lines Blanks Comments Code Complexity
───────────────────────────────────────────────────────────────────────────────
C 352 288903 35009 41638 212256 45085
XML 281 93275 13604 5176 74495 0
HTML 262 4608 926 8 3674 0
Forth 244 93006 13524 0 79482 656
C Header 197 38049 4830 19153 14066 285
Autoconf 80 6398 778 1832 3788 500
m4 56 3842 416 89 3337 0
@Software-Noob
Software-Noob / migrate-pterodactyl.md
Last active June 14, 2024 14:31
Pterodactyl panel and wings migration

Pterodactyl Migration

Migrating panel

  1. Backup your hidden .env file containing the decryption APP_KEY from /var/www/pterodactyl

  1. Export the database, in this case ours is named panel