Skip to content

Instantly share code, notes, and snippets.

View nelson6e65's full-sized avatar
:atom:
Creating software

Nelson Martell nelson6e65

:atom:
Creating software
View GitHub Profile
@nelson6e65
nelson6e65 / columns_with.html
Last active August 29, 2015 14:15
Table with 3 columns
<table>
<thead>
<tr>
<th>Column 1 heading</th>
<th>Column 2 heading</th>
<th>Column 3 heading</th>
</tr>
</thead>
<tbody>
<tr>
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
def ask(question:str):
answer = "?"
while (answer != "s" and answer != "n"):
answer = str(input("\n{0} (s/n): ".format(question)))
return (answer == "s");
//No conozco mucho de C, pero más o menos así iría el ciclo do:
char l;
bool valida; //Definimos un variable para almacenar si la letra es válida o no (flag)
do {
printf("\nIngrese una letra: ");
scanf("%c", &l);
if (l == 's' || l == 'S' || l == 'n' || l == 'N') {
valida = true;
@nelson6e65
nelson6e65 / config_hooks.php
Last active August 29, 2015 14:25
'Controller::beforeFilter' implementation in CodeIgniter2 example
<?php # File: application/config/hooks.php
# . . .
$hook['post_controller_constructor'] = [
'class' => 'ControllerHook',
'function' => 'beforeFilter',
'filename' => 'controller.php',
'filepath' => 'hooks',
'params' => []
@nelson6e65
nelson6e65 / Human.php
Last active March 19, 2016 19:20
php_nml v0.5.1: Reproduce issue when customized getter/setter prefixes (https://github.com/nelson6e65/php_nml/issues/9)
<?php
namespace AwesomeNamespace {
use NelsonMartell\Utilities\UnitTesting\Assert;
use NelsonMartell\Object;
use NelsonMartell\PropertiesHandler;
class Human extends Object {
use PropertiesHandler;
@nelson6e65
nelson6e65 / git.md
Last active April 7, 2017 15:21
Git

Instalación a partir del Código Fuente

Info original: https://git-scm.com/book/es/v2/Inicio---Sobre-el-Control-de-Versiones-Instalaci%C3%B3n-de-Git

Algunas personas desean instalar Git a partir de su código fuente debido a que obtendrás una versión más reciente. Los instaladores binarios tienen a estar un poco atrasados. Sin embargo, esto ha hecho muy poca diferencia a medida que Git ha madurado en los últimos años.

Para instalar Git desde el código fuente necesitas tener las siguientes librerías de las que Git depende: curl, zlib, openssl, expat y libiconv. Por ejemplo, si estás en un sistema que tiene yum (como Fedora) o apt-get (como un sistema basado en Debian), puedes usar estos comandos para instalar todas las dependencias:

Fedora

#Fedora

Habilitar Compiz y Emerald

compiz --replace
emerald --replace
@nelson6e65
nelson6e65 / git-po.md
Last active August 7, 2016 11:28
Spanish translation progress for Git (by files) - https://github.com/nelson6e65/transifex-git

TODO:

Traducción de archivos:

  • builtin/help.c (27/27)
  • advice.c (5/5)
  • archive.c (27/29)
  • merge-recursive.c (42/51)
  • git-submodule.sh (35/46)
  • pathspec.c (5/12) - Falta traducir 'magic' para completarla.
public class Hello
{
   public static void Main()
   {
-      System.Console.WriteLine("Hello, World!");
+      System.Console.WriteLine("Rock all night long!");
   }
}
@nelson6e65
nelson6e65 / update.sh
Created April 7, 2017 15:19
Actualizar configuración y caché de Laravel después de actualizar con `git pull`
#!/usr/bin/env bash
# -*- ENCODING: UTF-8 -*-
#
# Copyright © 2017 Nelson Martell (http://nelson6e65.github.io)
#
# Licensed under The MIT License (MIT)
#
# For full copyright and license information, please see the LICENSE
# Redistributions of files must retain the above copyright notice.
#