Skip to content

Instantly share code, notes, and snippets.

View skaag's full-sized avatar

Aric Fedida skaag

View GitHub Profile
#!/bin/bash
# Our minimal configuration
LOGFILE=/var/log/uploadtest.log
QUARANTINE_DIR=/opt/quarantine
##############################################################
#
# Some useful functions
#
@skaag
skaag / MakePHPTmpDir.sh
Created April 4, 2013 19:11
If you don't have an extra partition that you can use for temporary uploaded files via php, you can create a virtual drive. This script shows you how to do that.
# Create the file and format it
cd /opt
dd if=/dev/zero of=/opt/tmp-disk.img count=2048000
mkfs.ext3 -q /opt/tmp-disk.img
# Let's create the actual directory for it
mkdir /phptmp
chmod 1777 /phptmp
@skaag
skaag / redmine2.3inst.sh
Created May 9, 2013 14:43
Redmine 2.3 installation on Ubuntu 12.04 with RVM, Ruby 2.0, Passenger 4 and Nginx
# Install some system dependencies:
apt-get install build-essential openssl libcurl4-openssl-dev \
libreadline6 libreadline6-dev curl mysql-server libmysqlclient-dev git-core \
zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev \
libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion \
pkg-config imagemagick joe libmagickwand-dev libmagickwand4
# Install Ruby via RVM (easiest!):
cd /root/
@skaag
skaag / script.fex
Created June 13, 2013 13:28
An FEX file for Olimex's Olinuxino Micro with LCD7-TS
[product]
version = "1.0"
machine = "A13-EVB-V1.0"
[target]
boot_clock = 1008
dcdc2_vol = 1400
dcdc3_vol = 1200
ldo2_vol = 3000
ldo3_vol = 3300
@skaag
skaag / script_pwm.fex
Created June 13, 2013 13:55
A new script.fex for Olimex Olinuxino and LCD displays, using PWM
[product]
version = "1.0"
machine = "A13-EVB-V1.0"
[target]
boot_clock = 1008
dcdc2_vol = 1400
dcdc3_vol = 1200
ldo2_vol = 3000
ldo3_vol = 3300
@skaag
skaag / rs.config.json
Created September 17, 2013 14:05
Current configuration
{
"_id" : "owset",
"version" : 4,
"members" : [
{
"_id" : 0,
"host" : "ow-db1:27017"
},
{
"_id" : 1,
@skaag
skaag / gist:6911239
Created October 10, 2013 00:50
Meteor on ARMv7l throwing this weird type error
[[[[[ ~/myapp ]]]]]
handlebars: updating npm dependencies -- handlebars...
/opt/meteor/dev_bundle/lib/node_modules/fibers/future.js:173
throw(ex);
^
TypeError: Arguments to path.join must be strings
at path.js:360:15
at Array.filter (native)
altus2800.domain.local
description: System
product: Altus 2804i w/ Redundant 1400W PS (67021315)
vendor: Penguin Computing
version: 1234567890
serial: P1723144
width: 64 bits
capabilities: smbios-2.6 dmi-2.6 vsyscall64 vsyscall32
configuration: boot=normal chassis=server family=Altus sku=67021315 uuid=2278DA33-61F8-E211-803F-A5D6C9203500
*-core
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Linux version 2.6.32-042stab081.5 (root@rh6-build-x64) (gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC) ) #1 SMP Mon Sep 30 16:52:24 MSK 2013
[ 0.000000] Command line: ro root=UUID=c49895e6-6b04-4221-9129-b59bc0844129 nomodeset rd_NO_LUKS KEYBOARDTYPE=pc KEYTABLE=us LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto acpi_disabled=1 rd_NO_LVM rd_NO_DM rhgb quiet
[ 0.000000] KERNEL supported cpus:
[ 0.000000] Intel GenuineIntel
[ 0.000000] AMD AuthenticAMD
[ 0.000000] Centaur CentaurHauls
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: 0000000000000000 - 000000000009c400 (usable)
*PageSize NanoptixSlipPage/NanoptixSlipPage: "<</PageSize[184 439]/ImagingBBox null>>setpagedevice"
*CloseUI: *PageSize
*OpenUI *PageRegion/Media Size: PickOne
*OrderDependency: 10 AnySetup *PageRegion
*DefaultPageRegion: NanoptixRollPage
*PageRegion NanoptixRollPage/NanoptixRollPage: "<</PageSize[227 397]/ImagingBBox null>>setpagedevice"
*PageRegion NanoptixSlipPage/NanoptixSlipPage: "<</PageSize[184 439]/ImagingBBox null>>setpagedevice"
*CloseUI: *PageRegion
*DefaultImageableArea: NanoptixRollPage
*ImageableArea NanoptixRollPage/NanoptixRollPage: "0.00 0.00 226.77 396.85"