Skip to content

Instantly share code, notes, and snippets.

View 0x00dec0de's full-sized avatar

Sukhorukov Olexandr 0x00dec0de

View GitHub Profile
@0x00dec0de
0x00dec0de / main.css
Last active August 29, 2015 14:16
slider
#billboard {
width:100%;
min-height: 700px;
position:relative;
}
.slide {
color:white;
position:absolute;
width:100%;
@charset "UTF-8";
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
@0x00dec0de
0x00dec0de / animate-css.js
Created March 2, 2015 17:02
Animation when scrolling.
//Animate CSS + WayPoints javaScript Plugin
//Example: $(".element").animated("zoomInUp", "zoomOutDown");
//Author URL: http://webdesign-master.ru
(function($) {
$.fn.animated = function(inEffect, outEffect) {
$(this).css("opacity", "0").addClass("animated").waypoint(function(dir) {
if (dir === "down") {
$(this).removeClass(outEffect).addClass(inEffect).css("opacity", "1");
} else {
$(this).removeClass(inEffect).addClass(outEffect).css("opacity", "1");
// more about the angular promises see on the http://habrahabr.ru/post/221111/ (doc on russian language)
// The promise need be using when a function run as async function.
var app = angular.module('app', []);
app.controller('testController',['$scope','$q',function($scope, $q){
$scope.addOne = function(num){
$scope.step++;
console.log( num );
# The Nginx configuration based on https://coderwall.com/p/rlguog
http {
ssl_certificate server.crt;
ssl_certificate_key server.key;
ssl_session_timeout 15m;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_session_cache shared:SSL:10m;
## File used for defining $PS1
##-ANSI-COLOR-CODES-##
# Reset
Color_Off='\e[0m' # Text Reset
# Regular Colors
Black='\e[0;30m' # Black
Red='\e[0;31m' # Red
Green='\e[0;32m' # Green
@0x00dec0de
0x00dec0de / scj2innodb.sh
Created October 15, 2015 13:29
sch to inoddb
#!/bin/bash
TMPFILE=`mktemp tmp.XXXXXXXXX`
MYSQL=`which mysql`
PANEL=`hostname |cut -b3-4`
#echo $PANEL
if [ "$PANEL" = "wm" ]; then
MYPASS=`cat /root/mysql_passwd`
elif [ "$PANEL" = "da" ]; then
-- TABLE
create table users (
id serial PRIMARY KEY,
username varchar( 255 ) NOT NULL UNIQUE,
email varchar ( 255 ),
first_name varchar ( 255 ),
last_name varchar ( 255 ),
contacts varchar ( 500 ),
last_login timestamp
@0x00dec0de
0x00dec0de / PS1.sh
Created October 24, 2015 20:43
ps1 shell prompt
# save all the histories
export HISTFILESIZE=1000000
export HISTSIZE=1000000
# don't put duplicate lines or empty spaces in the history
export HISTCONTROL=ignoreboth
# combine multiline commands in history
shopt -s cmdhist
@0x00dec0de
0x00dec0de / ui-router-example.html
Created December 3, 2015 06:43
ui-router example with nested route and resolver
<!DOCTYPE html>
<html lang="en" ng-app="app">
<head>
<meta charset="UTF-8">
<title></title>
<base href="/dash/" />
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="http://angular-ui.github.io/ui-router/release/angular-ui-router.min.js"></script>
<script>
var app = angular.module('app', ['ui.router']);