Skip to content

Instantly share code, notes, and snippets.

@ggeorgaras
ggeorgaras / bullets.html
Created November 14, 2012 14:48 — forked from mrsweaters/bullets.html
Orbit Custom Bullets
<ul class="orbit-bullets">
<li class="has-thumb active" style="background-image: url(/path/to/bullets/bullet-one.jpg); background-position: initial initial; background-repeat: no-repeat no-repeat; ">1</li>
<li class="has-thumb" style="background-image: url(/path/to/bullets/bullet-two.jpg); background-position: initial initial; background-repeat: no-repeat no-repeat; ">2</li>
<li class="has-thumb" style="background-image: url(/path/to/bullets/bullet-three.jpg); background-position: initial initial; background-repeat: no-repeat no-repeat; ">3</li>
</ul>
@ggeorgaras
ggeorgaras / 0_reuse_code.js
Created October 23, 2013 11:26
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
.navbar-inner,
.navbar-fixed-top .navbar-inner,
.navbar-fixed-bottom .navbar-inner,
.navbar-static-top .navbar-inner {
background: none;
border: none;
-webkit-border-radius: 0;
border-radius: 0;
-moz-box-shadow: none;
-webkit-box-shadow: none;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML5 Local Storage Example</title>
<!-- include Bootstrap CSS for layout -->
<link href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.1/css/bootstrap-combined.min.css" rel="stylesheet">
<?php
class Encryption {
var $skey = "yourSecretKey"; // change this
public function safe_b64encode($string) {
$data = base64_encode($string);
$data = str_replace(array('+','/','='),array('-','_',''),$data);
return $data;
}
@ggeorgaras
ggeorgaras / gist:c9c4a2ba34b8b9a16136
Created November 20, 2015 10:43 — forked from shazdeh/gist:7949549
Respect sticky posts in category requests
<?php
function putStickyOnTop( $posts ) {
global $wp_query;
if( $wp_query->is_category() ){
$sticky_posts = get_option('sticky_posts');
$num_posts = count( $posts );
$sticky_offset = 0;
//loop over posts and relocate stickies to the front
@ggeorgaras
ggeorgaras / app.js
Created January 15, 2016 22:23 — forked from twilson63/app.js
AngularJS Contact Form Example
function ContactCtrl($scope, $http) {
$scope.success = false;
$scope.httpError = false;
$scope.send = function() {
var job = { job: { klass: 'msg', args: [$scope.msg]}};
$http.post('/contact',job).
success(function(data){
$scope.success = true;
$scope.msg = {};
@ggeorgaras
ggeorgaras / Linux Static IP
Created April 7, 2016 10:39 — forked from fernandoaleman/Linux Static IP
How To Configure Static IP On CentOS 6
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
@ggeorgaras
ggeorgaras / setup.sh
Created April 28, 2016 06:43 — forked from Benedikt1992/setup.sh
Setup apache-2.4.16 + php-5.6.11 on CentOS 6.7
#!/usr/bin/env bash
# Install dependencies
yum update -y
yum install -y gcc apr-devel apr-util-devel openssl-devel pcre-devel libxml2-devel libcurl-devel
mkdir setup && cd setup
wget http://mirror.softaculous.com/apache//httpd/httpd-2.4.16.tar.gz
tar -xvf httpd-2.4.16.tar.gz
@ggeorgaras
ggeorgaras / iptables.rules
Created May 31, 2016 10:34 — forked from samrocketman/iptables.rules
iptables rules for GitLab
#iptables config for gitlab
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
#:OUTPUT DROP [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT