Skip to content

Instantly share code, notes, and snippets.

View aaguilera's full-sized avatar

Angel Aguilera aaguilera

View GitHub Profile
@aaguilera
aaguilera / stylish_html_input_file.md
Last active August 29, 2015 14:08
Stylish HTML <input type="file">

Stylish HTML file input field

HTML

The idea is to hide the <input type="file"> field (which look&feel varies from browser to browser), and use a label element (which we can style using CSS) to trigger the file selector:

<label for="fileupload" style="some_cool_CSS_code">Choose file</label>
<input id="fileupload" type="file" name="fieldname" style="display:none">

Optional enhancement

@aaguilera
aaguilera / grant_acl_oracle11g.sql
Last active August 29, 2015 14:04
Grant access to network resources in Oracle 11g
--
-- Oracle 11g
-- Grant access for user 'SCOTT' to access port 25 on server 'mail.example.com'.
-- This script should be run as user 'SYS'.
--
DECLARE
v_username VARCHAR2(100) := 'SCOTT';
v_acl VARCHAR2(100) := 'mail_access.xml'; -- ACL names should end with '.xml'
v_description VARCHAR2(255) := 'Permission to access mail server.';
v_host VARCHAR2(100) := 'mail.example.com';
@aaguilera
aaguilera / caminstech-eclipse-formatter-java.xml
Last active August 12, 2019 14:31
CaminsTECH Java coding style (for Eclipse IDE)
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="16">
<profile kind="CodeFormatterProfile" name="CaminsTECH - Java" version="16">
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment" value="common_lines"/>
<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_logical_operator" value="insert"/>