Skip to content

Instantly share code, notes, and snippets.

View mrl22's full-sized avatar
💭
Always coding

Richard Leishman mrl22

💭
Always coding
View GitHub Profile
@mrl22
mrl22 / .htaccess
Last active August 29, 2015 14:17 — forked from sanusart/.htaccess
RewriteEngine on
RewriteRule .*\.git/.* - [F]
@mrl22
mrl22 / nginx.conf
Created July 5, 2016 13:18 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@mrl22
mrl22 / match-height.less
Last active November 8, 2016 15:25
Boostrap less to make all columns the same height inside a row
// Doesnt quite work right yet
.match-height {
display: table;
[class*="col-"] {
float: none;
display: table-cell;
vertical-align: top;
}
}
@mrl22
mrl22 / wordpress.css
Created November 10, 2016 15:08
Default WordPress styling
/* =WordPress Core
-------------------------------------------------------------- */
.alignnone {
margin: 5px 20px 20px 0;
}
.aligncenter,
div.aligncenter {
display: block;
margin: 5px auto 5px auto;
}
<div class="card">
<h3 class="card-header"></h3>
<div class="card-block">
</div>
</div>
<?php
$login = 'someone@somedomain.com';
$password = 'theirpassword';
$server = '{mail.someimapserver.com:143}INBOX.Sent';
$mbox = imap_open($server, $login, $password);
$n_msgs = imap_num_msg($mbox);
<?php
// Dont forget to load twitter oauth via Composer
$twitteruser = 'webfwd';
$tweetexpire = 60 * 30; // Seconds
$tweetfile = 'twitter.txt';
use Abraham\TwitterOAuth\TwitterOAuth;
if (!file_exists($tweetfile) || (time()-filemtime($tweetfile)) > $tweetexpire) {
$connection = new TwitterOAuth(
@mrl22
mrl22 / bootstrap4.scss
Last active December 16, 2016 12:53
Bootstrap v4 SCSS Media Queries
$xl-down: "max-width: 9999px";
$lg-down: "max-width: 1199px";
$md-down: "max-width: 991px";
$sm-down: "max-width: 767px";
$xs-down: "max-width: 575px";
$xl-up: "min-width: 1200px";
$lg-up: "min-width: 992px";
$md-up: "min-width: 768px";
$sm-up: "min-width: 576px";
@mrl22
mrl22 / font-smoothing.css
Last active December 16, 2016 12:57 — forked from bearroast/gist:3880174
Font smoothing
body {
-webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased;
font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-webkit-text-size-adjust: 100%;
}
@mrl22
mrl22 / gist:d779aa541d9c924febb1a944e62bad37
Last active December 16, 2016 13:01
Boostrap 3 sizes Less
@lg: ~"min-width: 1200px";
@md: ~"max-width: 1199px";
@sm: ~"max-width: 991px";
@xs: ~"max-width: 767px";