Skip to content

Instantly share code, notes, and snippets.

@ismaGNU
ismaGNU / gist:1711343
Created January 31, 2012 16:09
TableView Data
var row = Ti.UI.createTableViewRow(Nv.combine($$.TableViewRow,{
height:'auto'
})),
photo = Ti.UI.createImageView({
image:(gigs[i].images.small) ? gigs[i].images.small : '/img/nophoto.jpg',
left:0,
top:0,
width:56,
height:56
@ismaGNU
ismaGNU / Git recover
Created April 16, 2013 14:31
Recover a file on delete
git checkout $(git rev-list -n 1 HEAD -- "$file")^ -- "$file"
@ismaGNU
ismaGNU / Rename multiple files
Created April 16, 2013 15:16
Rename multiple files regular expresion
rename -n 's/9434(.*)/1$1/' *.jpg
@ismaGNU
ismaGNU / Network Loss
Created April 16, 2013 15:17
See network loss
mtr "ip"
mtr domain
rsync -avz ssh usuario@ip:/carpetasinc /carpeta/destino/
@ismaGNU
ismaGNU / Select and check column
Created May 13, 2013 08:55
SELECT and check if exist column in another table
SELECT
*, CASE WHEN EXISTS (
SELECT * FROM campaigns c
WHERE c.ev_id = e.ev_id) THEN 1 ELSE 0 END AS promoted
FROM
eventos e
WHERE
...
@ismaGNU
ismaGNU / new_gist_file
Created July 30, 2013 12:18
Limit Interface Bandwidth
wondershaper eth0 1024 512
@ismaGNU
ismaGNU / Draw image imagemagick
Created July 28, 2014 16:38
Draw an image with hex color through command line
convert -size 100x100 xc:#990000 whatever.png
@ismaGNU
ismaGNU / new_gist_file_0
Created July 30, 2014 09:32
Delete a bunch of redis key in LuA
EVAL "return redis.call('del', unpack(redis.call('keys',ARGV[1])))" 0 setlist:*
@ismaGNU
ismaGNU / designer.html
Created January 21, 2015 11:56
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">