Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Kat Padilla katpadi

🎯
Focusing
Block or report user

Report or block katpadi

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
@katpadi
katpadi / Docker Notes
Created Jun 15, 2014
Docker Cheat Sheet
View Docker Notes
Like "ls"
docker images
Like "rm" in linux -- change "<none>" to something relevant
docker rmi $(docker images | grep "^<none>" | awk '{print $3}')
Delete all images
docker rmi $(docker images -q)
Delete all containers
@katpadi
katpadi / WPxNGINX
Created Jul 7, 2014
WordPress x NGINX
View WPxNGINX
server {
server_name blog.katpadi.ph www.blog.katpadi.ph;
access_log /var/log/nginx/katpadi.ph.access.log;
error_log /var/log/nginx/katpadi.ph.error.log;
root /var/www;
index index.php;
location / {
@katpadi
katpadi / wp.gitignore
Created Jul 11, 2014
WordPress Development Typical .gitignore Setup
View wp.gitignore
# WordPress Deployment Typical .gitignore Setup
# Lesson Learned: You don't want WordPress core files in your repository!
# I usually use this inside "wp-content"
# Ignore everything in the "wp-content" directory, except the .gitignore
/*
!.gitignore
# Ignore everything in the "wp-content" directory, except the "themes" directory
# Then do NOT ignore some-theme-you-want-to-ignore
View MixCo-1
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="http://cmx.io/v/0.1/cmx.css">
<script src="http://cmx.io/v/0.1/cmx.js" charset="utf-8"></script>
<style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style>
</head>
<body>
<div style="max-width:900px; -webkit-transform:rotate(0deg)">
<scene id="scene1">
@katpadi
katpadi / UBUNTU_FUCKED_UP
Last active Aug 29, 2015
UBUNTU_FUCKED_UP
View UBUNTU_FUCKED_UP
1 #############################################################
2 ################### OFFICIAL UBUNTU REPOS ###################
3 #############################################################
4
5 ###### Ubuntu Main Repos
6 deb http://us.archive.ubuntu.com/ubuntu/ quantal main restricted universe multiverse
7 deb-src http://us.archive.ubuntu.com/ubuntu/ quantal main restricted universe multiverse
8
9 ###### Ubuntu Update Repos
10 deb http://us.archive.ubuntu.com/ubuntu/ quantal-security main restricted universe multiverse
@katpadi
katpadi / README.md
Last active Aug 29, 2015
Docker x Fig x WordPress
View README.md

Docker x Fig x WordPress

Personal notes for my local WP development environment. Because I used to run Vagrant then, I took an arrow to the knee.


Install Docker, m*therfucker.

sudo sh -c "echo deb https://get.docker.io/ubuntu docker main\ > /etc/apt/sources.list.d/docker.list" 
sudo apt-get update 
sudo apt-get install lxc-docker
View TitanStuff
<?php
class TitanStuff {
function __construct( ) {
$this->init();
}
function init() {
$this->titan = TitanFramework::getInstance( '_s' );
View gist:b4fa41d088e97cf861a6
#!/bin/bash
maxdelay=$((16*60)) # 16 hours from 2am to 11pm, converted to minutes
for ((x=1; x<=24; x++)); do
# pick random delay for each of the 24 runs
delay=$(($RANDOM%maxdelay))
# background a subshell to wait, then run
(sleep $((delay*60)); cd /apps/xdaysb4nba && ruby fave.rb || echo "ERROR!") &
done
View gist:425ea20db85d141e4328
#!/bin/bash
echo `date` >> /tmp/autofaves.log
maxdelay=$((16*60)) # 16 hours from 2am to 11pm (in minutes)
for ((x=1; x<=24; x++)); do
# pick random delay for each of the 24 runs
delay=$(($RANDOM%maxdelay))
# background a subshell to wait, then run
(sleep $((delay*60)); cd /apps/xdaysb4nba && ruby fave.rb || echo "ERROR!") &
done
@katpadi
katpadi / gist:313c8951e3d39a27882c
Created Oct 13, 2014
MyAwesomeTasks Simple RSpec
View gist:313c8951e3d39a27882c
require 'rails_helper'
describe 'MyAwesomeTasks' do
let!(:dummy_task) { create :my_awesome_task }
describe "Tasks Form" do
subject { page }
it { is_expected.to have_field('my_awesome_task[title]') }
it { is_expected.to have_field('my_awesome_task[description]') }
it { is_expected.to have_field('my_awesome_task[content]') }
You can’t perform that action at this time.