Skip to content

Instantly share code, notes, and snippets.

View fordnox's full-sized avatar
🍕
Eating pizza

Andrius Putna fordnox

🍕
Eating pizza
View GitHub Profile
@canhnt
canhnt / git-delete-local-tag.sh
Created August 9, 2017 09:11
Delete local tags that do not exist in remote
git fetch --prune origin "+refs/tags/*:refs/tags/*"
@tinogomes
tinogomes / DNS_TO_LOCALHOST.markdown
Last active June 13, 2025 04:12
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.

Example:

# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com
@ChgoChad
ChgoChad / commands.php
Last active January 5, 2024 22:18 — forked from escopecz/commands.php
Script to run Mautic (https://mautic.org) commands from a URL.
<?php
if (!isset($_GET['ILoveMautic'])) {
echo 'The secret phrase is wrong.';
die;
}
$link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$allowedTasks = array(
'cache:clear',
@tianchaijz
tianchaijz / tips_lsof.sh
Last active January 8, 2025 20:23 — forked from sergepetit/tips_lsof.sh
Shell command lsof : see open files and ports; Selection is OR by default, use -a for AND; Tested on OSX
#list all ports for tcp
sudo lsof -itcp
#find all things listening on ports
lsof -Pnl +M -i4 | grep LISTEN
#all ports for tcp, dont resolve port name from numbers
sudo lsof -itcp -P
#open files and ports of process #$PID
@hackprime
hackprime / items.py
Last active April 7, 2020 17:58
Register many applications at Yandex OAuth Service by single run using spider on Scrapy
import scrapy
class AppCredentialsItem(scrapy.Item):
domain = scrapy.Field()
public_key = scrapy.Field()
secret_key = scrapy.Field()
@escopecz
escopecz / commands.php
Last active April 18, 2023 22:43 — forked from alanhartless/cron.php
Script to run Mautic (https://mautic.org) commands from a URL.
<?php
if (!isset($_GET['ILoveMauticReallyIDo'])) {
echo 'The secret phrase is wrong.';
die;
}
$link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$allowedTasks = array(
'cache:clear',
@joemiller
joemiller / clone-all.sh
Last active December 28, 2020 18:02
clone all repos from an org, including private repos
#!/bin/sh
# Reqs: curl, ruby, git
#
# TOKEN: Create a personal access token here: https://github.com/settings/tokens
#
# Usage:
#
# To clone all repos from $ORG into current directory:
#
# $ curl https://gist.githubusercontent.com/joemiller/2dd72670e37769cb647c/raw | TOKEN=<githubtoken> ORG=<orgname> bash
@neilgee
neilgee / git.css
Last active June 18, 2025 06:22
Git Command Line Reference - Notes, Cheatsheet and reminders on Git set up and commands
/*
* Set up your Git configuration
*/
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
git config --global core.editor "nano"
@chrisliuqq
chrisliuqq / gist:6865643
Created October 7, 2013 10:22
css tree digaram
http://codepen.io/chuongdang/pen/lcnsC
<!--
We will create a family tree using just CSS(3)
The markup will be simple nested lists
-->
<div class="tree">
<ul>
<li>
<a href="#">Parent</a>
@plentz
plentz / nginx.conf
Last active June 25, 2025 06:48
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048