Skip to content

Instantly share code, notes, and snippets.

View bgruszka's full-sized avatar

Blazej Gruszka bgruszka

View GitHub Profile
@bgruszka
bgruszka / zte.js
Created September 13, 2024 11:36 — forked from tpoechtrager/zte.js
/*
*
* Original code by Miononno
* https://www.youtube.com/watch?v=1kanq1w2DA0
*
* Enhanced by unknown @ lteforum.at
*
*/
console.log("Loading ZTE Script v" + "2024-08-31-#1");
@bgruszka
bgruszka / global-gitignore.md
Created July 15, 2018 09:07 — forked from subfuzion/global-gitignore.md
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file. Create a file called .gitignore in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.

Mac

git config --global core.excludesfile ~/.gitignore

Windows

git config --global core.excludesfile %USERPROFILE%\.gitignore
@bgruszka
bgruszka / gist:487d6e0ad12e39b5251952f1a8ac6285
Created August 31, 2016 07:02 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@bgruszka
bgruszka / convert.php
Last active August 29, 2015 14:26 — forked from dantleech/convert.php
Script to convert symfony YAML translation file to XLIFF
<?php
// Script to convert Symfony YAML translation files to XLIFF.
//
// Will add a .xliff version of the given file in its directory.
//
// $ php convert.php path/to/MyBundle.en.yml
$file = $argv[1];
@bgruszka
bgruszka / bongo.sh
Last active August 29, 2015 14:26 — forked from smashew/bongo.sh
This one works... Tested
LOADING=false
usage()
{
cat << EOF
usage: $0 [options] dbname
OPTIONS:
-h Show this help.
-l Load instead of export
@bgruszka
bgruszka / gitlab.conf
Last active August 29, 2015 14:26 — forked from sameersbn/gitlab.conf
Nginx reverse proxy configuration for GitLab
upstream gitlab {
server 172.17.42.1:10080 fail_timeout=0;
}
# let gitlab deal with the redirection
server {
listen 80;
server_name git.example.com;
server_tokens off;
root /dev/null;

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<!--
Documented at
http://linux.die.net/man/5/fonts-conf
To check font mapping run the command at terminal
$ fc-match 'helvetica Neue'
module.exports = (robot) ->
robot.respond /deploy to stage/i, (msg) ->
process.chdir('/your/dir')
doing = require('child_process').spawn 'phing', ['remotedeploy','-Denv=stage']
msg.send 'stage deployment request sent'
"""An lxml Port of Nirmal Patel's port (http://nirmalpatel.com/fcgi/hn.py) of
Arc90's Readability to Python.
"""
import re
from lxml.html import fromstring, tostring
from lxml.html.clean import Cleaner
NEGATIVE = re.compile('comment|meta|footer|footnote|foot')
POSITIVE = re.compile('post|hentry|entry|content|text|body|article')