[ Mousemove / TouchSwipe || Click/Tap to Add ]
Interactive 3D system inspired by the Boötes constellation:
A Pen by Tiffany Rayside on CodePen.
# -*- coding: utf-8 -*- | |
import Image | |
def resize_and_crop(img_path, modified_path, size, crop_type='top'): | |
""" | |
Resize and crop an image to fit the specified size. | |
args: | |
img_path: path for the image to resize. |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> | |
<style> | |
.wrp{ | |
text-align: center; | |
margin: 50px auto 0; | |
} |
#!/bin/sh | |
BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD 2>/dev/null); | |
if [ -n $BRANCH_NAME ] && [ $BRANCH_NAME != 'master' ]; | |
then | |
echo "$(tr [:lower:] [:upper:] <<< [$BRANCH_NAME]) $(< $1)" > $1; | |
fi |
$ sudo apt-get install xclip | |
# Downloads and installs xclip. If you don't have `apt-get`, you might need to use another installer (like `yum`) | |
$ xclip -sel clip < ~/.ssh/id_rsa.pub | |
# Copies the contents of the id_rsa.pub file to your clipboard |
<?php | |
function colorize($text, $status) { | |
$out = ""; | |
switch($status) { | |
case "SUCCESS": | |
$out = "[42m"; //Green background | |
break; | |
case "FAILURE": | |
$out = "[41m"; //Red background |
[ Mousemove / TouchSwipe || Click/Tap to Add ]
Interactive 3D system inspired by the Boötes constellation:
A Pen by Tiffany Rayside on CodePen.
<?php | |
config([ | |
'mail.host' => 'smtp.yandex.ru', | |
'mail.port' => 465, | |
'mail.encryption' =>'ssl', | |
'mail.username' => 'username', | |
'mail.password' => 'password' | |
]); | |
$app = App::getInstance(); |
function Bezier(a, b, c, d) { | |
this.a = a; | |
this.b = b; | |
this.c = c; | |
this.d = d; | |
this.len = 100; | |
this.arcLengths = new Array(this.len + 1); | |
this.arcLengths[0] = 0; | |
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Updated: 2010/12/05 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2013 Diego Perini (http://www.iport.it) | |
// | |
// Permission is hereby granted, free of charge, to any person |
function isUrl(url) { | |
var re = /^(http\:\/\/|https\:\/\/)?([a-z0-9][a-z0-9\-]*\.)+[a-z0-9][a-z0-9\-]*[a-z0-9]$/i; | |
return re.test(url); | |
} | |
console.log(isUrl('12domain.ru')); // true | |
console.log(isUrl('www.domain.com')); // true | |
console.log(isUrl('http://domain.com')); // true | |
console.log(isUrl('https://domain.com')); // true |