Skip to content

Instantly share code, notes, and snippets.

View DefrostedTuna's full-sized avatar

Rick Bennett DefrostedTuna

View GitHub Profile
@skydiablo
skydiablo / gist:1122473
Created August 3, 2011 12:04
PHP SSH2 Wrapper
<?php
class ssh2 {
const SSH_COMMAND_FINISHED_FLAG = '___SSH_COMMAND_FINISHED___';
private $host = 'localhost';
private $port = 22;
private $username = 'root';
private $password = '';
private $connectionMethods = array(
@estliberitas
estliberitas / reset.js
Created January 3, 2013 23:27
Node.js script which makes Tor change identity (i.e. IP address)
/**
* Created with IntelliJ IDEA.
* User: Alexander <estliberitas> Makarenko
* Date: 04.01.13
* Time: 3:25
*/
'use strict';
var fs = require('fs')
, net = require('net')
@mobilemind
mobilemind / git-tag-delete-local-and-remote.sh
Last active June 11, 2024 11:25
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@thomasfr
thomasfr / Git push deployment in 7 easy steps.md
Last active May 1, 2024 23:17
7 easy steps to automated git push deployments. With small and configurable bash only post-receive hook
@PurpleBooth
PurpleBooth / README-Template.md
Last active June 20, 2024 01:55
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

@mrabbani
mrabbani / mailgun-config.md
Last active January 8, 2024 01:45
Laravel Mailgun Setup
@lopspower
lopspower / README.md
Last active June 20, 2024 12:56
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@Rich-Harris
Rich-Harris / service-workers.md
Last active June 14, 2024 06:20
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@ryanscherler
ryanscherler / CustomCollection.php
Last active December 15, 2018 20:41
Extends Laravel collections to convert array items to a collection recursively.
<?php
namespace App\Support\Collection;
use \Illuminate\Support\Collection;
class CustomCollection extends Collection {
/**
* Converts array items to a collections recursively.