Skip to content

Instantly share code, notes, and snippets.

@SomeCallMeTom
SomeCallMeTom / install_mysql_client.sh
Last active April 4, 2024 16:13 — forked from sshymko/install_mysql_client.sh
Install MySQL 8.0 client on Amazon Linux 2
#!/bin/sh
sudo yum install -y https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm
sudo yum install -y mysql-community-client
@chris-sev
chris-sev / setup.sh
Last active February 10, 2024 03:17
Mac Setup
# how to run this thingy
# create a file on your mac called setup.sh
# run it from terminal with: sh setup.sh
# heavily inspired by https://twitter.com/damcclean
# https://github.com/damcclean/dotfiles/blob/master/install.sh
# faster dock hiding/showing (run in terminal)
# defaults write com.apple.dock autohide-delay -float 0; defaults write com.apple.dock autohide-time-modifier -int 0;killall Dock
@ezimuel
ezimuel / decrypt.php
Created April 26, 2018 13:07
Decrypt a file in PHP form an encrypted file with OpenSSL CLI
<?php
/**
* Decrypt a file generated with the command line:
* openssl enc -aes-256-cbc -in file-to-encrypt -out encrypted-file -k password
*
* To decrypt:
* php decrypt.php encrypted-file password decrypted-file
*
* NOTE: this script has been tested with OpenSSL v.1.1, for old version
* please check if you need to use MD5 instead of SHA256 in EVP_BytesToKey()
@andrieslouw
andrieslouw / cfban.php
Created October 11, 2016 15:21
Cloudflare V4 PHP API - block / unblock IP in firewall
<?php
/**
* @author https://github.com/andrieslouw
* @copyright 2016
**/
function cfban($ipaddr){
$cfheaders = array(
'Content-Type: application/json',
'X-Auth-Email: your@email.com',
#!/bin/bash
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Mathias Leppich <mleppich@muhqu.de>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@MikeWilkie
MikeWilkie / local.xml
Last active November 28, 2018 04:47
Magento – Disable Excessive Logging and Reporting in app/etc/local.xml
<?xml version="1.0"?>
<!-- license -->
<config>
<global>
<!-- global config -->
</global>
<frontend>
<events>
<!-- disble logs -->
<controller_action_predispatch>
@subfuzion
subfuzion / mongo-autostart-osx.md
Last active March 2, 2022 00:57
mongo auto start on OS X

Install with Homebrew

brew install mongodb

Set up launchctl to auto start mongod

$ ln -sfv /usr/local/opt/mongodb/*.plist ~/Library/LaunchAgents

/usr/local/opt/mongodb/ is a symlink to /usr/local/Cellar/mongodb/x.y.z (e.g., 2.4.9)