- create a new redis .conf file
$ cp /etc/redis.conf /etc/redis-xxx.conf
- edit /etc/redis-xxx.conf, illustrated as below
...
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
/* CSS */ | |
#!/bin/bash | |
# | |
# This Bash script installs Moodle (http://moodle.org) and all it's | |
# requirements into a freshly installed Centos or RHEL 7 operating system. | |
# It assumes an 'Enforced' SELinux environment and configures the system | |
# accordingly. | |
# | |
# It is designed to be instructional and clear to read to persons unfamiliar | |
# with Bash and as such does *no* sanity checking before taking actions. | |
# Becasue of this *great* care should be taken if you feel the urge to run |
<?php | |
/** | |
* simple method to encrypt or decrypt a plain text string | |
* initialization vector(IV) has to be the same when encrypting and decrypting | |
* | |
* @param string $action: can be 'encrypt' or 'decrypt' | |
* @param string $string: string to encrypt or decrypt | |
* | |
* @return string | |
*/ |
'use strict'; | |
var gulp = require('gulp'), | |
watch = require('gulp-watch'), | |
prefixer = require('gulp-autoprefixer'), | |
uglify = require('gulp-uglify'), | |
sass = require('gulp-sass'), | |
sourcemaps = require('gulp-sourcemaps'), | |
rigger = require('gulp-rigger'), | |
cssmin = require('gulp-minify-css'), |
<?php | |
class BaseModel extends Eloquent { | |
public static function isJoined($query, $table) | |
{ | |
$joins = $query->getQuery()->joins; | |
if($joins == null) { | |
return false; | |
} |
server { | |
listen 80 default_server; | |
server_name example.com www.example.com; | |
access_log /srv/www/example.com/logs/access.log; | |
error_log /srv/www/example.com/logs/error.log; | |
root /srv/www/example.com/public; | |
index index.php index.html; |
$ cp /etc/redis.conf /etc/redis-xxx.conf
...
curl --header 'Authorization: token INSERTACCESSTOKENHERE' \ | |
--header 'Accept: application/vnd.github.v3.raw' \ | |
--remote-name \ | |
--location https://api.github.com/repos/owner/repo/contents/path | |
# Example... | |
TOKEN="INSERTACCESSTOKENHERE" | |
OWNER="BBC-News" | |
REPO="responsive-news" |
<?php | |
$arr = array(); | |
$arr[0]['derp'] = 'hi'; | |
$arr[0]['blerg'] = 'hey'; | |
produceCSV('data.csv', $arr); | |
function produceCSV($file_name, $arr) { |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |