Skip to content

Instantly share code, notes, and snippets.

View DarrylDias's full-sized avatar
🎯
Focusing

Darryl Dias DarrylDias

🎯
Focusing
View GitHub Profile
@DarrylDias
DarrylDias / md5.php
Created January 18, 2015 12:42
An MD5 generator written in PHP
<?php error_reporting(0);
if (isset($_POST['content'])) {
if (!empty($_POST['content'])) {
$hash = md5($_POST['content']);
}
}
@DarrylDias
DarrylDias / image.css
Created December 14, 2014 05:53
Colorize image on hover animation
img {
-webkit-filter: grayscale(100%);
-webkit-transition: -webkit-filter 500ms linear;
}
img:hover {
-webkit-filter: grayscale(20%);
}
@DarrylDias
DarrylDias / rvm.md
Created December 8, 2014 03:03
Installing RVM on Mint

Importing gpg key

curl -sSL https://rvm.io/mpapis.asc | gpg --import -

Installing RVM.

\curl -sSL https://get.rvm.io | bash -s stable
// To make images retina, add a class "2x" to the img element
// and add a <image-name>@2x.png image. Assumes jquery is loaded.
function isRetina() {
var mediaQuery = "(-webkit-min-device-pixel-ratio: 1.5),\
(min--moz-device-pixel-ratio: 1.5),\
(-o-min-device-pixel-ratio: 3/2),\
(min-resolution: 1.5dppx)";
if (window.devicePixelRatio > 1)
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 200 }}{% else %}{{ site.description }}{% endif %}">
{% for page in site.pages %}
{% if page.layout == 'custom-page '%}
{{ page.title }}
{% endif %}
{% endfor %}
{% for page in site.pages %}
{{ page.title }}
{% endfor %}
#!/bin/bash
#Heith Seewald 2012
#Feel free to extend/modify to meet your needs.
#Maya on Ubuntu v.1
#This is the base installer... I’ll add more features in later versions.
#if you have any issues, feel free email me at heiths@gmail.com
#### Lets run a few checks to make sure things work as expected.
#Make sure we’re running with root permissions.
if [ `whoami` != root ]; then

Wagtail tutorial

Thanks to [Serafeim Papastefanos] for authoring this tutorial. Please note that the installation process is in flux; most of the steps here should soon be unnecessary.

[Wagtail] is a new Open Source [Django]-based CMS. In this 20 minute tutorial we will see how you can create a blog from scratch using Wagtail. If you want to see some more examples of usage please take a look at the [wagtaildemo] GitHub project.

To follow this tutorial you will need to have [Python] 2.7 installed with a working version of [pip] and [virtualenv].

Installing the wagtail dependencies

@DarrylDias
DarrylDias / nginx.conf
Created October 18, 2014 09:47
NGINX 1.7.x config for Ubuntu Server
server
{
listen 80;
server_name localhost;
root /srv/www;
index index.php;
location /{
try_files $uri $uri/ /index.php;
}