Skip to content

Instantly share code, notes, and snippets.

@xantiagoma
xantiagoma / Tiles.md
Last active May 1, 2024 21:47
Map tiles
@fnky
fnky / ANSI.md
Last active May 1, 2024 21:47
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@MjHead
MjHead / jet-engine-cct-api.php
Last active May 1, 2024 21:47
API to interact with JetEngine CCT from directly PHP code
<?php
/**
* JetEngine CCT-related API functions to use in theme or plugin
*
* Theme usage - include get_theme_file_path( 'jet-engine-cct-api.php' );
* Plugin usage - include PLUGIN_PATH . 'path-to-file-inside-plugin/jet-engine-cct-api.php';
*/
/**
@mael
mael / tricks.md
Last active May 1, 2024 21:45
Xcode 10.2 "Unable to boot the Simulator"

Solution "Unable to boot the Simulator"

sudo mkdir /private/tmp

sudo chmod 1777 /private/tmp

Other basic command

xcrun

xcrun simctl list devices //to list all simulators

xcrun simctl delete // to delete specific device

@jclosure
jclosure / play_spotify_via_winamp.md
Last active May 1, 2024 21:43
How to play your Spotify music in Winamp and get Visualizatons

Spotiamp features a builtin Shoutcast® server, so you can easily stream the music to any device supporting Shoutcast, such as Sonos.

Download and install Winamp

I've installed version 5.8

https://www.winamp.com/

@umayr
umayr / recover-deleted-branch.sh
Created April 1, 2016 11:41
How to recover a deleted branch
## Pre-requisite: You have to know your last commit message from your deleted branch.
git reflog
# Search for message in the list
# a901eda HEAD@{18}: commit: <last commit message>
# Now you have two options, either checkout revision or HEAD
git checkout a901eda
# Or
git checkout HEAD@{18}
@igorjs
igorjs / rest-api-response-format.md
Last active May 1, 2024 21:40
REST API response format based on some of the best practices
@dhh
dhh / linux-setup.sh
Last active May 1, 2024 21:38
linux-setup.sh
# CLI
sudo apt update -y
sudo apt install -y \
git curl \
docker.io docker-buildx \
build-essential pkg-config autoconf bison rustc cargo clang \
libssl-dev libreadline-dev zlib1g-dev libyaml-dev libreadline-dev libncurses5-dev libffi-dev libgdbm-dev libjemalloc2 \
libvips imagemagick libmagickwand-dev mupdf mupdf-tools \
redis-tools sqlite3 libsqlite3-0 libmysqlclient-dev \
rbenv apache2-utils
@jparishy
jparishy / doc.md
Last active May 1, 2024 21:35
Snapchat Example API Doc

Snapchat API

Base URL

https://snapchat-example-api.herokuapp.com/api/v1/

Notes

  • All endpoints accept JSON payloads for parameters
    • Must include "Content-Type" HTTP header with value "application/json"
    • All endpoints accept /users/authenticate require the X-Api-Token HTTP header
@bradp
bradp / setup.sh
Last active May 1, 2024 21:34
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install