I've been trying to understand how to setup systems from
the ground up on Ubuntu. I just installed redis
onto
the box and here's how I did it and some things to look
out for.
To install:
/* | |
Copyright 2011 Martin Hawksey | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
-- phpMyAdmin SQL Dump | |
-- version 3.3.8.1 | |
-- http://www.phpmyadmin.net | |
-- | |
-- Host: localhost | |
-- Generation Time: Jan 28, 2012 at 04:56 PM | |
-- Server version: 5.0.91 | |
-- PHP Version: 5.3.6-pl0-gentoo | |
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
# Map NFS uid/gid to current user. This can be used to create a | |
# user inside the VM with matching uid/gid which makes file access | |
# a lot easier. | |
config.nfs.map_uid = Process.uid | |
config.nfs.map_gid = Process.gid |
function whatDoesItDo(val){ | |
return val ? 1 : 2; | |
} |
//oauth2 auth | |
chrome.identity.getAuthToken( | |
{'interactive': true}, | |
function(){ | |
//load Google's javascript client libraries | |
window.gapi_onload = authorize; | |
loadScript('https://apis.google.com/js/client.js'); | |
} | |
); |
/** | |
* Mass (bulk) insert or update on duplicate for Laravel 4/5 | |
* | |
* insertOrUpdate([ | |
* ['id'=>1,'value'=>10], | |
* ['id'=>2,'value'=>60] | |
* ]); | |
* | |
* | |
* @param array $rows |
#!/bin/sh | |
#Check the Drive Space Used by Cached Files | |
du -sh /var/cache/apt/archives | |
#Clean all the log file | |
#for logs in `find /var/log -type f`; do > $logs; done | |
logs=`find /var/log -type f` | |
for i in $logs |
### ElasticSearch version | |
if [ -z "$1" ]; then | |
echo "" | |
echo " Please specify the Elasticsearch version you want to install!" | |
echo "" | |
echo " $ $0 1.7.1" | |
echo "" | |
exit 1 | |
fi |
Magento 1.x: | |
Mage::getStoreConfig('carriers/shipper/active') | |
Magento 2.x: | |
protected $scopeConfig; | |
public function __construct( | |
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig |