Skip to content

Instantly share code, notes, and snippets.

View buralex's full-sized avatar

Oleksandr Burlachenko buralex

View GitHub Profile
@buralex
buralex / git commands
Last active October 18, 2017 06:40
git commands
git add .
git commit -m "first commit"
git push -u origin master
(git push -f origin master)(!!!!!! old commits will be dropped !!! if I want to overwrite all on remote repo)
/*--------------------- BRANCHES ------------------------*/
https://www.youtube.com/watch?v=xAKnRuYobdc&index=4&list=PLoonZ8wII66iUm84o7nadL-oqINzBLk5g#t=497.839849
//git branch alex // create branch
/**/
@buralex
buralex / interesting links
Last active October 15, 2017 11:38
interesting links
@buralex
buralex / PDO classes.md
Last active May 6, 2017 22:18
PDO conection to DB

PDO Classes for db connect and manipulation

Below is a description on how to use the classes in the below script

###Include script and set up db variables

include 'zdb.php';
@buralex
buralex / .htaccess
Created May 10, 2017 17:34 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@buralex
buralex / box-shadow.html
Created May 21, 2017 23:31 — forked from ocean90/box-shadow.html
CSS3 Box Shadow, only top/right/bottom/left and all
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;
function showDrivers(drivers) {
outputDiv.innerHTML = '';
var myTableDiv = outputDiv;
var table = document.createElement('TABLE');
table.className += " nearest_table table table-striped table-bordered";
UPDATE drivers
SET latitude = CASE id
WHEN 1133 THEN 38.2546174
WHEN 1134 THEN 37.63950904
END,
longitude = CASE id
WHEN 1133 THEN -84.1931136
WHEN 1134 THEN -85.25878743
END
WHERE id IN (1133,1134)
https://habrahabr.ru/post/269135/
http://www.vr-online.ru/forum/kak-ustroen-messendzher-tipa-skype-ili-ee-tipovaja-arhitektura-9577
https://github.com/arhangeldim/messenger/wiki/%D0%97%D0%B0%D0%B4%D0%B0%D0%BD%D0%B8%D0%B5-2---Messenger
http://hostciti.net/faq/mysql/arhitektura-db-dlya-messendgera.html
@buralex
buralex / geo.js
Created August 24, 2017 20:57 — forked from mkhatib/geo.js
A Javascript utility function to generate number of random Geolocations around a center location and in a defined radius.
/**
* Generates number of random geolocation points given a center and a radius.
* @param {Object} center A JS object with lat and lng attributes.
* @param {number} radius Radius in meters.
* @param {number} count Number of points to generate.
* @return {array} Array of Objects with lat and lng attributes.
*/
function generateRandomPoints(center, radius, count) {
var points = [];
for (var i=0; i<count; i++) {
@buralex
buralex / ubuntu
Last active April 24, 2018 07:22
https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-16-04
/* when this trouble-> /etc/sudoers is owned by uid 1000, should be 0
*/
pkexec chown root:root /etc/sudoers /etc/sudoers.d -R
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games chmod a+x filename
https://www.howtogeek.com/114884/how-to-repair-grub2-when-ubuntu-wont-boot/
https://www.youtube.com/watch?v=OmMkAGuZxCE