Skip to content

Instantly share code, notes, and snippets.

View sam3k's full-sized avatar

Samuel Roldan sam3k

View GitHub Profile
@sam3k
sam3k / .bash_profile
Last active February 16, 2017 21:36
.bash_profile
# Some `ls` shortcuts
alias ll="ls -laG" # ls vertically and with more info in a table/column layout
alias lscount="ls -1 | wc -l" # count files/folders in current directory
# resize tmux window up|down
alias tmuxup="tmux resize-p -U 5"
alias tmuxdown="tmux resize-p -D 5"
alias tmuxleft="tmux resize-p -L 5"
alias tmuxright="tmux resize-p -R 5"
@sam3k
sam3k / .tmux.conf
Created February 16, 2017 21:30
Tmux Configuration
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# force a reload of the config file
unbind r
bind r source-file ~/.tmux.conf
# quick pane cycling
@sam3k
sam3k / Ruby map error
Created September 6, 2016 17:43
undefined method `message' for "TypeError: window.textContent is undefined":String (NoMethodError)
class DriverJSError < StandardError; end
AfterStep do |scenario, step|
errors = page.driver.browser.manage.logs.get(:browser)
.select {|e| e.level == "SEVERE" }
.map(&:message)
.to_a
if errors.any?
message = errors.map(&:message).join("\n\n")
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"> </script>
</head>
<body>
<div id="div1">Div 1</div>
<div id="div2">Div 2</div>
<div id="div3">Div 3</div>
<img src="http://brand.jquery.org/resources/jquery-mark-light.gif" />
</body>
.hi-icon-effect-6 .hi-icon {
box-shadow: 0 0 0 4px rgba(255,255,255,1);
transition: background 0.2s, color 0.2s;
}
.no-touch .hi-icon-effect-6 .hi-icon:hover {
background: rgba(255,255,255,1);
color: #64bb5d;
}
var app = angular.module('myApp', ['ngGrid', 'ui.bootstrap']);
app.controller('MyCtrl', function($scope, $window) {
$scope.percentage = 65;
$scope.myData = [
{ name : "Moroni", age: 50},
{ name : "Tiancum", age: 43},
{ name : "Jacob", age: 27},