Skip to content

Instantly share code, notes, and snippets.

@kibal4iw
kibal4iw / php-UA.php
Last active August 29, 2015 14:25 — forked from walkergv/php-UA.php
Simple Event Tracking with Measurement Protocol Using cURL and PHP (plus redirect)
<?
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => 'http://www.google-analytics.com/collect?v=1&tid=[UA-XXXXXXXXX-1]&cid=[RANDOM_INTEGER_OR_GUID]&t=event&ec=[EVENT_CATEGORY]&ea=[EVENT_ACTION]&el=[EVENT_LABEL]',
CURLOPT_USERAGENT => 'Vanity-URL-Tracker',
));
$resp = curl_exec($curl);
curl_close($curl);
header("HTTP/1.1 301 Moved Permanently");
@import "_font.scss";
html {
font-size: percentage($_FONT_SIZE_ROOT / 16px);
}
.foo {
@include font(23px, 30px, bold);
}
@kibal4iw
kibal4iw / MySql-5.5-installation guide.md
Created September 14, 2019 13:11 — forked from ahmadhasankhan/MySql-5.5-installation guide.md
Install MySQL 5.5.xx on Ubuntu

MySQL Download URL

https://dev.mysql.com/get/Downloads/MySQL-5.5/mysql-5.5.56-linux-glibc2.5-x86_64.tar.gz

Open the terminal and follow along:

  • Uninstall any existing version of MySQL
sudo rm /var/lib/mysql/ -R
@kibal4iw
kibal4iw / setup-mysql.sh
Created September 14, 2019 17:49 — forked from sheikhwaqas/setup-mysql.sh
Install MySQL Server on Ubuntu (Non-Interactive Installation)
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Set the Server Timezone to CST
echo "America/Chicago" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Enable Ubuntu Firewall and allow SSH & MySQL Ports
ufw enable
ufw allow 22
@kibal4iw
kibal4iw / show_ssl_expire
Created November 27, 2020 20:29 — forked from bmatthewshea/show_ssl_expire
Retrieve/Check SSL certificate expiration date(s)
#!/bin/bash
# By B Shea Dec2018 & Mar2020
# https://www.holylinux.net
# Test for OpenSSL - if not installed stop here.
if ! [[ -x $(which openssl) ]]; then
printf "\nOpenSSL not found or not executable.\nPlease install OpenSSL before proceeding.\n\n"
exit 1
fi
@kibal4iw
kibal4iw / vim_cheatsheet.txt
Created December 9, 2023 08:18 — forked from drucoder/vim_cheatsheet.txt
ViM cheatsheet
Файл настройки: ~/.vimrc
Можно редактировать файлы через сеть, например
:e <scp|ftp|ftps>://user@host/path/to/the/file.txt
:Ex или :e ./ - файловый менеджер
== Основы ==
hjkl перемещение в разные стороны
i режим вставки
I добавление в начало строки
a режим добавления