start new:
tmux
start new with session name:
tmux new -s myname
CREATE TABLE `paises` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`iso` char(2) DEFAULT NULL, | |
`nombre` varchar(80) DEFAULT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ; | |
INSERT INTO `paises` VALUES(1, 'AF', 'Afganistán'); | |
INSERT INTO `paises` VALUES(2, 'AX', 'Islas Gland'); | |
INSERT INTO `paises` VALUES(3, 'AL', 'Albania'); |
// create a bookmark and use this code as the URL, you can now toggle the css on/off | |
// thanks+credit: https://dev.to/gajus/my-favorite-css-hack-32g3 | |
javascript: (function() { | |
var styleEl = document.getElementById('css-layout-hack'); | |
if (styleEl) { | |
styleEl.remove(); | |
return; | |
} | |
styleEl = document.createElement('style'); | |
styleEl.id = 'css-layout-hack'; |
app.module['myApp'].directive('imageOnload', function() { | |
return { | |
restrict: 'A', | |
link: function(scope, element, attrs) { | |
element.bind('load', function() { | |
// call the function that was passed | |
scope.$apply(attrs.imageOnload); | |
// usage: <img ng-src="src" image-onload="imgLoadedCallback()" /> | |
}); |
When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.
Raw Attribute Strings
<div my-directive="some string" another-param="another string"></div>
<?php | |
$files = array_slice($argv, 1); | |
foreach ($files as $file) { | |
$picture = file_get_contents($file); | |
$size = getimagesize($file); | |
// base64 encode the binary data, then break it into chunks according to RFC 2045 semantics | |
$base64 = chunk_split(base64_encode($picture)); |
// default exports | |
export default 42; | |
export default {}; | |
export default []; | |
export default foo; | |
export default function () {} | |
export default class {} | |
export default function foo () {} | |
export default class foo {} |
Install git:
sudo apt-get install git
Configure Git:
touch ~/.gitignore_global
git config --global core.excludesfile ~/.gitignore_global
git config --global user.name "Your Name"
git config --global user.email "Your Email"
# Atom Cheatsheet. | |
# Project Key Bindings. | |
- 'cmd-shift-p': open the command palette. | |
- 'cmd-p' or 'cmd-t': open the fuzzy finder to find a file. | |
- 'cmd-b': look for a file that is already open. | |
- 'cmd-shift-b': search the list of files modified and untracked in your project repository. | |
- 'ctrl-0': open and focus the the tree view. |
############################################# | |
# Push de la rama actual | |
git push origin $rama_actual | |
############################################# | |
# Volver a un commit anterior, descartando los cambios | |
git reset --HARD $SHA1 | |
############################################# | |
# Ver y descargar Ramas remotas |