Skip to content

Instantly share code, notes, and snippets.

@subfuzion
subfuzion / curl.md
Last active May 13, 2025 18:51
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>limit.maxfiles</string>
<key>ProgramArguments</key>
<array>
<string>launchctl</string>
<string>limit</string>
@tombigel
tombigel / README.md
Last active May 12, 2025 12:24 — forked from a2ikm/limit.maxfiles.plist
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

@0-Sony
0-Sony / CmsBlockInstaller.php
Last active August 10, 2020 12:59
Magento 2 : Create Cms Block Programmatically
<?php
namespace Namespace\Cms\Setup;
use Magento\Cms\Api\BlockRepositoryInterface;
use Magento\Cms\Api\Data\BlockInterface;
use Magento\Cms\Api\Data\BlockInterfaceFactory;
use Magento\Framework\App\State;
use Magento\Framework\App\Area;
use Magento\Framework\Setup\InstallDataInterface;
@xeptore
xeptore / Change_php_version_ubnutu.md
Last active February 5, 2021 11:07
How to downgrade/upgrade PHP versions on Ubuntu-based linux distros

Add Repo

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get upgrade

Install PHP5.6

sudo apt-get install php5.6 php5.6-cli php5.6-common libapache2-mod-php5.6 php5.6-mysql php5.6-fpm php5.6-curl php5.6-gd php5.6-bz2 php5.6-mcrypt php5.6-json php5.6-tidy php5.6-mbstring php5.6-intl php-redis php-memcached php-gettext php-xdebug
@GhazanfarMir
GhazanfarMir / Instructions.sh
Last active December 22, 2024 01:12
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
@saurabheights
saurabheights / QuickSystemSetup.sh
Last active December 19, 2024 11:02
A gist to quickly setup ubuntu for your needs.
# Disable need to provide password for sudo. use only if you can lock system when afk.
# Add below line to the end of file, where replace $USER with your system username.
sudo visudo
$USER ALL=(ALL) NOPASSWD: ALL
# Install fzf for better reverse search
sudo apt install fzf
cat /usr/share/doc/fzf/README.Debian # For how to integrate with your shell
echo "source /usr/share/doc/fzf/examples/completion.bash" » ~/.bashrc
@dunglas
dunglas / example.php
Created April 19, 2018 06:25
A minimalist GraphQL client for PHP
<?php
$query = <<<'GRAPHQL'
query GetUser($user: String!) {
user (login: $user) {
name
email
repositoriesContributedTo {
totalCount
}
@tayhimself
tayhimself / php-int.md
Created July 13, 2018 22:10
PHP intl extension using macOS 10.13 PHP 7.1.x

If you're using brew you need to do nothing. weprovide/valet-plus#127

If you're using the native macos PHP, make sure php is running fine, and see what modules are installed

$php -m

You will see a bunch of modules but they're missing intl

Go here and choose the install script you need to go https://php-osx.liip.ch/

@robhrt7
robhrt7 / MySQL_5-7_macOS.md
Last active December 18, 2024 08:43 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL 5.7 on macOS using Homebrew

This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).

Install MySQL 5.7 on macOS

This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.