Skip to content

Instantly share code, notes, and snippets.

View carlitoplatanito's full-sized avatar

Carlito Platanito carlitoplatanito

View GitHub Profile
@sudocarlos
sudocarlos / cloudflare_tunnels.sh
Last active April 30, 2024 03:28
Download, configure and run Cloudflare tunnels for Start9 services
#!/usr/bin/env bash
# Warn and prompt
read -p "Note, this script is reckless! You should not be exposing your Start9 the
Internet like this. This will allow Cloudflare to read all processed data.
Do you really want to continue?? [Y/N]" -n 1 -r
if [[ $REPLY =~ ^[Yy]$ ]]; then
# Variables
TUNNEL_NAME=start9
@sdesalas
sdesalas / docker-cockpit-portainer.sh
Last active February 12, 2024 20:15
Docker + Portainer + Cockpit
#1 Openssh server
sudo apt install -y openssh-server
sudo systemctl enable ssh
sudo systemctl start ssh
sudo ufw enable
sudo ufw allow ssh
#2 Docker (https://docs.docker.com/engine/install/ubuntu/)
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
<?php
/*
* @copyright 2019 Mautic Contributors. All rights reserved
* @author Mautic
*
* @link http://mautic.org
*
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
@andrew8088
andrew8088 / localStateRedux.js
Created March 15, 2016 18:49
A simple way to save your Redux state in localStorage.
let propsToSave = [];
export const setProps = (props) => propsToSave = props;
export const getLocalStore = () => JSON.parse(localStorage.getItem('state'));
export const setLocalStore = (store) => {
var toSave = {};
var state = store.getState();
propsToSave.forEach(p => toSave[p] = state[p]);
localStorage.setItem('state', JSON.stringify(toSave));
};
@trinitronx
trinitronx / xcode-cli-tools.sh
Last active January 18, 2024 05:20
Script to download & install XCode Command Line tools on OSX 10.7 or 10.8. Lifted from jedi4ever/veewee template.
#!/bin/sh
# 2021-12-09:
# This script is no longer supported!
# Apple broke all direct downloads without logging with an Apple ID first.
# The number of hoops that a script would need to jump through to login,
# store cookies, and download is prohibitive.
# Now we all must manually download and mirror the files for this to work at all :'-(
OSX_VERS=$(sw_vers -productVersion | awk -F "." '{print $2}')
@mshafrir
mshafrir / states_hash.json
Created May 9, 2012 17:05
US states in JSON form
{
"AL": "Alabama",
"AK": "Alaska",
"AS": "American Samoa",
"AZ": "Arizona",
"AR": "Arkansas",
"CA": "California",
"CO": "Colorado",
"CT": "Connecticut",
"DE": "Delaware",