Skip to content

Instantly share code, notes, and snippets.

View ReactiveRaven's full-sized avatar

David Godfrey ReactiveRaven

View GitHub Profile
@ReactiveRaven
ReactiveRaven / atom.sh
Created January 27, 2015 11:49
atom update ubuntu
#!/bin/bash
remver=`wget -O - https://atom.io/releases 2>/dev/null | grep "<h2>v" | cut -f 2 -d "v" | cut -f 1 -d " " | head -n 1 | tr -d " \n";`;
locver=`/usr/bin/atom --version | tr -d " \n"`;
if [ "$remver" != "$locver" ];
then
echo "outdated $locver -> $remver";
echo "Need sudo.";
sudo echo "Thank you.";
if [ -f /tmp/atom.deb ];
then
Using the selenium server at http://127.0.0.1:4444/wd/hub
Feature: Login
As a user
I want to be able to log in to the app
So I can access its delicious juices
Scenario: Test it works # test/features/login.feature:6
Given I am on the start page # test/features/login.feature:7
@ReactiveRaven
ReactiveRaven / gist:9348401
Last active December 16, 2022 18:30
Ubuntu memory tuning

Add these lines to the end of /etc/sysctl.conf:

vm.swappiness=5
vm.min_free_kbytes=122880
vm.vfs_cache_pressure=500

Run these commands as root:

sudo sysctl -w vm.swappiness=5;

sudo sysctl -w vm.min_free_kbytes=122880

@ReactiveRaven
ReactiveRaven / gist:8824407
Created February 5, 2014 14:14
downgrade php 5.5 to 5.4
# upgrade system, so you can add to ignore all updates later
sudo apt-get update
sudo apt-get upgrade
# remove your php, apache, etc
sudo apt-get purge apache2 php5 libapache2-mod-php5 # add here your server packages
# change repositories to raring (with backup)
sudo sed -i.bak "s/saucy/raring/g" /etc/apt/sources.list

A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.

I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.

I'd love comments and suggestions about any of these.

I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.

I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".

@ReactiveRaven
ReactiveRaven / gist:7641268
Last active December 29, 2015 08:09
Things to think about

Workstations

  • Desk
  • Chair
  • Display
  • Power
  • Stationery
  • Lighting

Personality

  • Benefits
@ReactiveRaven
ReactiveRaven / gist:7581801
Last active December 28, 2015 23:49
Questions

PHP

null == 0;
0 == "0x0";
null != "0x0";

Why?

JS

/**
* @Route("/user");
*/
class Users
{
/**
* @Route("/{user_slug}")
* @ParamConverter("user", options={"mapping": {"user_slug": "slug"}})
* @Template
* @Secure("ROLE_ADMIN")
<?php
// src/Acme/SubscriptionBundle/Entity/Transaction.php
use Symfony\Component\Validator\Constraints as Assert;
use Doctrine\ORM\Mapping as ORM;
class Transaction
{
/**
* @Assert\Luhn(message = "Please check your credit card number.")
#!/bin/bash
apt-get -y -qq install google-chrome-stable netbeans compizconfig-settings-manager ntp
./server_packages.sh