Skip to content

Instantly share code, notes, and snippets.

Rueben Ramirez ruebenramirez

Block or report user

Report or block ruebenramirez

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View setup-franz-ubuntu.sh
#!/bin/bash
sudo rm -fr /opt/franz
sudo rm -fr /usr/share/applications/franz.desktop
# create installation dir
sudo mkdir -p /opt/franz
#install franz
@ruebenramirez
ruebenramirez / create-orders-programmatically.md
Created May 5, 2016
magento create orders programmatically
View create-orders-programmatically.md
View object-usage.php
<?php
// create a class `foo` with a member function `do_foo`
class foo
{
function do_foo()
{
echo "Doing foo.";
}
}
View gist:8c288d6fa58424b3ac3d
#cloud-config
hostname: coreos0
ssh_authorized_keys:
coreos:
etcd:
discovery: https://discovery.etcd.io/0a83a3865b073785c3abff511b72a126
addr: 10.10.1.3:4001
peer-addr: 10.10.1.3:7001
View maxmemory-key-eviction.md

#The ObjectRocket Customer Support Story We had an RTG customer using Redis as a cache for their web-app. They were receiving write errors from Redis in their application as writes were attempted. Usually this is due to running out of available memory in Redis. After diagnosing the issue, we were able to quickly update their maxmemory policy to resolve the problem. How, and why, did this solve their problem? There are a few things to know about key eviction and the various maxmemory policies available in Redis.

Redis can be configured to behave differently when the database gets full. There are various options to recycle memory used by less important keys (through eviction) to allow for continued writes. Key eviction operations are the same as key deletions: the key is no longer accessible and the memory it occupied is marked as available for overwriting. What does it mean for the Redis db to be "full" though?

If we do not specify a maxmemory value in the Redis configuration, Redis will continue to a

View soundcard-config.md

source: http://askubuntu.com/a/14083

$ pacmd list-sinks

 * index: 1
        name: <alsa_output.pci-0000_00_1b.0.analog-stereo>
        driver: <module-alsa-card.c>
        flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
View gist:673c13f279a845c3750d
>> i = Instance.find_by_id 324769
Instance Load (3.0ms) SELECT `redis_instances`.* FROM `redis_instances` WHERE `redis_instances`.`id` = 324769 LIMIT 1
=> #<Instance id: 324769, user_id: 26524, server_id: 101, port: 9025, version: "2.8.17", encrypted_password: "Ffj8yl5NIadXGM6Z2fZdmLwdqokaLO2wf17sI/ytm9ufg/DZ9PS...", memory: 20971520, hash_max_zipmap_entries: 64, hash_max_zipmap_value: 512, activerehashing: true, appendfsync: "everysec", created_at: "2014-12-16 16:16:36", updated_at: "2015-01-14 02:32:06", status: "running", last_bgrewriteaof_at: nil, timeout: 150, plan: "mini", databases: 1, connections: 50, last_backup_at: "2015-01-14 02:32:05", slave: false, master_host: nil, master_port: nil, encrypted_master_password: nil, persistence: "aof", snapshots: ["900 1", "300 10", "60 10000"], label: "greeneye-9025", vm_enabled: false, vm_max_memory: 0, vm_page_size: 32, vm_max_threads: 4, vm_size: 0, config_command: "890df345366e5addcf11cac5f4861ae5", slave_serve_stale_data: true, maxmemory_policy: "volatile
@ruebenramirez
ruebenramirez / cros-haswell-modules.sh
Last active Aug 29, 2015
cros-haswell-modules.sh
View cros-haswell-modules.sh
#!/bin/bash
# Modified for Arch Linux from ChrUbuntu's cros-haswell-modules.sh
# https://googledrive.com/host/0B0YvUuHHn3MndlNDbXhPRlB2eFE/cros-haswell-modules.sh
set -e
# Create a temp directory for our work
tempbuild=`mktemp -d`
cd $tempbuild
View deploy4.sh
#!/bin/bash
curl -LO https://www.dropbox.com/s/7o2881dkro5sure/4-string-manipulation.git.tgz
tar -xzvf 4-string-manipulation.git.tgz
cd 4-string-manipulation.git/
python test*
@ruebenramirez
ruebenramirez / Weight-loss_diet_plan.md
Last active Jan 2, 2016
My friend John shared this diet plan as a scanned image. It was was a bit scary to look at and had a couple of typos, so here it is as markdown. I'm not a doctor, dietitian or any other type of health professional, so please consult one before following this diet!
View Weight-loss_diet_plan.md

Weight-loss Diet Plan

Your weight should drop 20 pounds in two weeks. The basis of this diet is chemical, and it maintains your energy while reducing. Quantities are not very important except where indicated.

Some Rules

  1. No substitutes.
  2. Diet for 14 Days only and not one day longer.
  3. No alcoholic beverages or diet drinks. (Only water, coffee, and/or tea).
  4. Abstain from eating anything not included in this diet, but be sure to eat what is assigned rather than do without.
  5. Do not eat between meals
You can’t perform that action at this time.