This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#SERVER FILE | |
#Copyright 2013 Ricard Solé | |
#This program is free software: you can redistribute it and/or modify | |
#it under the terms of the GNU General Public License as published by | |
#the Free Software Foundation, either version 3 of the License, or | |
#(at your option) any later version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#SERVER FILE | |
#Copyright 2013 Ricard Solé | |
#This program is free software: you can redistribute it and/or modify | |
#it under the terms of the GNU General Public License as published by | |
#the Free Software Foundation, either version 3 of the License, or | |
#(at your option) any later version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
author: @grumpylion | |
description: does the calculations with the punchcard variable as input | |
*/ | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.Arrays; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.Arrays; | |
public class funciones { | |
private static BufferedReader stdin = new BufferedReader(new InputStreamReader(System.in)); | |
public int how_many_times(String movies_array[][], String rent_array[][]) throws IOException { | |
String input, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## author @grumpylionking | |
createuser() | |
{ | |
echo "desired user name: " | |
read user | |
echo "desired group name: " | |
read group |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## author : Ricard Sole Casas | |
## description : Script that captures input by nfc-list and does what you tell it to do | |
## twitter : @codinglion | |
## github : http://github.com/codinglion | |
## gist : http://gist.github.com/codinglion | |
while true; do | |
input=`nfc-list | grep UID | cut -d ":" -f 2 | sed 's/ //g'` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo apt-get install samba | |
$ sudo vi /etc/samba/smb.conf | |
# look for workgroup = WORKGROUP and change WORKGROUP for the workgroup name you set up on Windows | |
# look for the line #security = user and uncomment it | |
# save and exit | |
$ sudo echo -e "[sharedfolder]\n\tpath = /path/to/share/folder\n\tbrowsable = yes\n\tguest ok = no\n\tread only = yes\n\tcreate mask = 0755" >> /etc/samba/smb.conf | |
$ sudo smbpasswd -a `whoami` | |
$ sudo restart smbd && sudo restart nmbd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.*; | |
import java.util.Arrays; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
//author: lion | |
public class main { | |
private static String paths[] = {"coches.txt", "Ventas.txt", "vendedores.txt"}; // default files are these, assumed to be in the same directory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Haz un programa en Java obtenga la fecha actual del sistema y | |
// a. Permita obtener por separado y lo muestre por consola: el día del mes, | |
// el día de la semana y la hora (formato 24h). Revisa la documentación | |
// de las clases java.util.Calendar, java.util.GregorianCalendar para | |
// llevar a cabo este apartado. Por ejemplo si la fecha actual del | |
// sistema es Fri Aug 30 16:05:13 CEST 2013, la salida por consola sería | |
// Día del mes: 30 | |
// Día de la semana: 6 | |
// Hora del día (24Hrs): 16 | |
// b. Permita añadir un mes a la fecha actual y muestre la fecha calculada |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Haz un programa en Java que solicite al usuario 5 títulos de películas y su género (mini base de | |
// datos de una videoteca). Almacena estos datos en un array multidimensional. | |
// El programa debe permitir que el usuario pueda realizar una búsqueda por palabras del título y | |
// por género. Para ello: | |
// a. Solicita al usuario una palabra de búsqueda del título. Busca en el array las | |
// coincidencias y muéstralas por consola, indicando título/s completo de la/s película/s | |
// junto su género. | |
// b. Solicita al usuario un género. Busca en el array y muestra por consola los títulos de las | |
// películas que coincidan con el género facilitado | |
import java.util.Arrays; |
OlderNewer