Skip to content

Instantly share code, notes, and snippets.

@spir1donov
spir1donov / curl.md
Created July 31, 2020 08:48 — forked from subfuzion/curl.md
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.

@spir1donov
spir1donov / tmux.md
Created May 14, 2020 09:22 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@spir1donov
spir1donov / iterm2-solarized.md
Created May 7, 2020 06:22 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

install PHPMyAdmin on Nginx Ubuntu 18.04
https://youtu.be/pGc8DbJVupE How to Install Nginx, PHP, MySQL (LEMP) on Ubuntu 18.04
sudo apt update && sudo apt install nginx -y
sudo service nginx status
sudo ufw allow OpenSSH
sudo ufw allow 'Nginx HTTP'
sudo ufw enable
sudo ufw status
check ngix is working, go load your website up, has default ngix page
sudo apt update && sudo apt install mysql-server -y
@spir1donov
spir1donov / ajax-file-upload.js
Created June 29, 2017 07:14 — forked from nilcolor/ajax-file-upload.js
Upload file using FormData (a-la AJAX file upload using XMLHTTPRequest2)
function sendForm() {
var fileData = new FormData(document.getElementById("cpd-file"));
var xhr = new XMLHttpRequest();
xhr.open("POST", "/upload_file", true);
xhr.setRequestHeader('Accept', 'application/json');
xhr.onload = function(progressEvent) {
if (xhr.status == 200) {
console.log('Uploaded', xhr);
} else {
@spir1donov
spir1donov / GIF-Screencast-OSX.md
Created December 26, 2016 11:11 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@spir1donov
spir1donov / RightClick.applescript
Created April 30, 2016 16:12 — forked from vitorgalvao/Right Click.applescript
Make right-clicking on OSX accessible via a keyboard shortcut.
(*
Even though [a native solution](http://stackoverflow.com/questions/9171613/right-click-shortcut-for-mac-lion-os) exists, it still suffers from a big flaw (it right-clicks the place you cursour is, not what you’re selecting). This addresses that limitation.
You can install this as a [Finder Service, , and later asign it a keyboard shortcut](http://www.macosxautomation.com/services/learn/tut01/index.html).
*)
tell application "System Events" to set frontApp to name of first process whose frontmost is true
@spir1donov
spir1donov / tg-example-bot.pl
Created January 24, 2016 08:48 — forked from Robertof/tg-example-bot.pl
Basic Telegram bot implementation using WWW::Telegram::BotAPI
#!/usr/bin/env perl
# Basic Telegram Bot implementation using WWW::Telegram::BotAPI
use strict;
use warnings;
use WWW::Telegram::BotAPI;
my $api = WWW::Telegram::BotAPI->new (
token => (shift or die "ERROR: a token is required!\n")
);
@spir1donov
spir1donov / gist:728d79e029d555717d4d
Created January 24, 2016 08:43 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@spir1donov
spir1donov / DI.m3u
Created January 24, 2016 08:38 — forked from sim642/DI.m3u
Digitally Imported premium streams
#EXTM3U
#EXTINF:-1,Digitally Imported - Ambient
http://pub1.diforfree.org:8000/di_ambient_hi
#EXTINF:-1,Digitally Imported - Big Room House
http://pub1.diforfree.org:8000/di_bigroomhouse_hi
#EXTINF:-1,Digitally Imported - Breaks
http://pub1.diforfree.org:8000/di_breaks_hi