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
<?xml version='1.0' encoding='utf-8'?> | |
<Context> | |
<WatchedResource>WEB-INF/web.xml</WatchedResource> | |
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource> | |
<Resource name="jdbc/tienda" auth="Container" type="javax.sql.DataSource" | |
maxActive="100" maxIdle="30" maxWait="10000" | |
username="tomcat" password="s3cr3t-hsqldb" driverClassName="org.hsqldb.jdbc.JDBCDriver" | |
url="jdbc:hsqldb:hsql://localhost:11000/tienda"/> | |
</Context> |
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
package es.daniel.notes; | |
import android.app.ListActivity; | |
import android.content.Context; | |
import android.os.Bundle; | |
import android.view.ActionMode; | |
import android.view.Menu; | |
import android.view.MenuInflater; | |
import android.view.MenuItem; | |
import android.view.View; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<!--tarjetas--> | |
<color name="note_shadow">#ffcfc7b8</color> | |
<color name="note_dark_shadow">#ffada59a</color> | |
<color name="note_bg">#fffff7e8</color> | |
<color name="note_highlight">#ffffffff</color> | |
<color name="underline">#ffefe8d9</color> | |
<!--separador --> | |
<color name="separator">#ffe24c46</color> |
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
netsh interface ip set address "Wi-Fi" static 10.38.24.24 255.255.0.0 10.38.0.1 1 | |
netsh interface ip set dnsservers "Wi-Fi" static 156.35.41.4 primary | |
netsh interface ip add dnsservers "Wi-Fi" addr=156.35.14.2 index=2 |
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 | |
sudo apt-get install python-pip git -y | |
sudo pip install git+git://github.com/Lokaltog/powerline | |
wget https://github.com/Lokaltog/powerline/raw/develop/font/PowerlineSymbols.otf https://github.com/Lokaltog/powerline/raw/develop/font/10-powerline-symbols.conf | |
sudo mv PowerlineSymbols.otf /usr/share/fonts/ | |
sudo fc-cache -vf | |
sudo mv 10-powerline-symbols.conf /etc/fonts/conf.d/ | |
# vim status line |
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.BufferedWriter; | |
import java.io.File; | |
import java.io.FileReader; | |
import java.io.FileWriter; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.Random; | |
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
[global] | |
workgroup = WORKGROUP | |
server string = %h server (Samba, Ubuntu) | |
server role = standalone server | |
map to guest = Bad User | |
obey pam restrictions = Yes | |
pam password change = Yes | |
passwd program = /usr/bin/passwd %u | |
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . | |
unix password sync = Yes |
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/sh | |
# Call this script as root like: | |
# ./addmediauser.sh myusername mypassword | |
# Password will be shown in plain text (obviously) | |
# so watch out for shoulder surfers! | |
USERNAME=$1 | |
PASSWORD=$2 | |
useradd --create-home --groups samba timemachine --shell /bin/false $USERNAME |
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
#!/usr/bin/env python | |
# Based on http://unix.stackexchange.com/a/12483 | |
# To use it you have to give it execution privilleges | |
# with the command: | |
# chmod u+x split.py | |
# Then you can use it like this: | |
# ./split.py <slides.pdf >split.pdf | |
import copy, sys | |
from pyPdf import PdfFileWriter, PdfFileReader |
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
;=====================================================; | |
; This piece of code runs certain times depending on ; | |
; how many nested loops you create. Each loop can ; | |
; count up to 255. ; | |
; We declare a variable for each loop and preload ; | |
; them with the default value (maxium FFh or 255d ; | |
; For demonstration purposes we're using just 3 ; | |
; nested loops executing a total of 845.325 times ; | |
;=====================================================; |
OlderNewer