Skip to content

Instantly share code, notes, and snippets.

@SantoshSrinivas79
SantoshSrinivas79 / pyrocms-permissions.sh
Last active August 7, 2022 11:11
Fix PyroCMS File & Folder Permissions All-In-One
sudo chmod -R 777 system/cms/cache
sudo chmod -R 777 system/cms/config
sudo chmod -R 777 addons
sudo chmod -R 777 system/cms/cache
sudo chmod -R 777 uploads
sudo chmod -R 666 system/cms/config/config.php
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active August 19, 2025 17:12
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@VinGarcia
VinGarcia / walksync.js
Last active September 9, 2020 11:18 — forked from kethinov/walksync.js
// List all files in a directory in Node.js recursively in a synchronous fashion
var walkSync = function(dir, filelist) {
if( dir[dir.length-1] != '/') dir=dir.concat('/')
var fs = fs || require('fs'),
files = fs.readdirSync(dir);
filelist = filelist || [];
files.forEach(function(file) {
if (fs.statSync(dir + file).isDirectory()) {
@ghinda
ghinda / git-commit-csv-export.sh
Last active July 30, 2024 13:46
git csv export of commits in the last month
git log --since='last month' --pretty=format:'%h;%an;%ad;%s' --author='Ionut Colceriu' > ~/log.csv
@pepijnolivier
pepijnolivier / laraveltimestamps.py
Last active October 31, 2020 12:48
Create laravel timestamps on each table in mysqlworkbench.
# -*- coding: utf-8 -*-
# MySQL Workbench Python script
#
# <description>
# Written in MySQL Workbench 6.3.6
# Fetch all tables,
# For each table, add created_at, updated_at, deleted_at timestamps,
# Except for many-to-many tables
# Configurable options:
# addDeletedAt: True / False. Add the deleted_at timestamp column
@pepijnolivier
pepijnolivier / ensure_valid_id_types.py
Last active October 31, 2020 12:48
Mysql Workbench script to ensure all id columns and foreign keys are unsigned integers. All ID columns should also be auto-incremental
# -*- coding: utf-8 -*-
# MySQL Workbench Python script
#
# <description>
# Written in MySQL Workbench 6.3.6
import grt
# get a reference to the schema in the model. This will get the 1st schema in it.
@kremalicious
kremalicious / tor-openvpn.sh
Last active July 6, 2025 23:21
Install and configure Tor as proxy for all OpenVPN server traffic
# what we want:
# client -> OpenVPN -> Tor -> Internet
# Install & configure OpenVPN
# https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04
# assumed OpenVPN configuration
# 10.8.0.1/24-Subnet
# tun0-Interface
@solipsis
solipsis / main.go
Created December 21, 2017 19:36
Get BTC or BCH balance from xpub
package main
import (
"encoding/json"
"errors"
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
@sumonst21
sumonst21 / index.html
Created August 30, 2021 00:20
Select Field with Search - AlpineJs + Tailwind
<div class="flex flex-col items-center">
<div class="w-full md:w-1/2 flex flex-col items-center h-64">
<div class="w-full px-4">
<div x-data="selectConfigs()" x-init="fetchOptions()" class="flex flex-col items-center relative">
<div class="w-full">
<div @click.away="close()" class="my-2 p-1 bg-white flex border border-gray-200 rounded">
<input
x-model="filter"
x-transition:leave="transition ease-in duration-100"
x-transition:leave-start="opacity-100"