This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
funtion parseYoutubeVideoID($link) { | |
preg_match("/^(?:http(?:s)?:\/\/)?(?:www\.)?(?:m\.)?(?:youtu\.be\/|youtube\.com\/(?:(?:watch)?\?(?:.*&)?v(?:i)?=|(?:embed|v|vi|user)\/))([^\?&\"'>]+)/", $link, $matches); | |
return $matches[1]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$host_array = array_reverse(explode('.', parse_url(url())['host'])); | |
$domain = $host_array[1]; | |
$tld = $host_array[0]; | |
$host = $domain . '.' . $tld; | |
Route::group(['domain' => '{sub}.' . $host], function () { | |
get('/', function($sub) { | |
return 'Subdomain: ' . $sub; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function localizedDate($datetime, $year = false, $lang = false) | |
{ | |
$lng = ($lang == 'ge' || $lang == 'en') ? $lang : \Lang::getLocale(); | |
$months = [ | |
'ge' => [1 => 'იან', 2 => 'თებ', 3 => 'მარ', 4 => 'აპრ', 5 => 'მაის', 6 => 'ივნ', 7 => 'ივლ', 8 => 'აგვ', 9 => 'სექტ', 10 => 'ოქტ', 11 => 'ნოე', 12 => 'დეკ'], | |
'en' => [1 => 'Jan', 2 => 'Feb', 3 => 'Mar', 4 => 'Apr', 5 => 'May', 6 => 'Jun', 7 => 'Jul', 8 => 'Aug', 9 => 'Sep', 10 => 'Oct', 11 => 'Nov', 12 => 'Dec'], | |
]; | |
$timestamp = strtotime($datetime); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ -> | |
check = -> | |
$ '.wrapper, .footer-wrapper' | |
.removeAttr 'style' | |
doc = $(document).innerHeight() | |
wrapper = $('.wrapper').innerHeight() | |
if doc > wrapper | |
$ '.wrapper' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<meta property="og:title" content="OG Title" /> | |
<meta property="og:site_name" content="OG Site Name" /> | |
<meta property="og:description" content="OG Description" /> | |
<meta property="og:url" content="Site URL" /> | |
<meta property="og:type" content="website" /> | |
<meta property="og:image" content="Image URL" /> | |
<meta property="fb:admins" content="Your Facebook ID" /> | |
<meta property="fb:app_id" content="Facebook App ID" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autoprefixer = require 'gulp-autoprefixer' | |
coffee = require 'gulp-coffee' | |
gulp = require 'gulp' | |
gutil = require 'gulp-util' | |
ignore = require 'gulp-ignore' | |
minifycss = require 'gulp-minify-css' | |
notify = require 'gulp-notify' | |
plumber = require 'gulp-plumber' | |
rename = require 'gulp-rename' | |
stylus = require 'gulp-stylus' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$letters = [ | |
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z' | |
]; | |
$nums = [ | |
0, 1, 2, 3, 4, 5, 6, 7, 8, 9 | |
]; | |
$count = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('.list .checkAll').change -> | |
status = this.checked | |
boxes = $('.list input[type="checkbox"]:not(.checkAll)') | |
boxes.each (i, elem) => | |
elem.checked = status | |
return | |
$('.list input[type="checkbox"]:not(.checkAll)').change -> | |
num = $('.list input[type="checkbox"]:not(.checkAll)').filter(':not(:checked)').length # shows not checked num | |
if num == 0 | |
$('.list .checkAll')[0].checked = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title>Lotuashvili.me</title> | |
<meta http-equiv="refresh" content="0;URL='http://lotuashvili.me/'" /> | |
</head> | |
<body> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Average { | |
public static void main(String[] args) { | |
Scanner input = new Scanner(System.in); | |
double total = 0, grade, average, roundedAverage; | |
int num, count = 0; | |
System.out.print("Sheiyvanet ricxvebis raodenoba: "); | |
num = input.nextInt(); |
NewerOlder