myApp.factory('Excel',function($window){
var uri='data:application/vnd.ms-excel;base64,',
template='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>',
base64=function(s){return $window.btoa(unescape(encodeURIComponent(s)));},
format=function(s,c){return s.replace(/{(\w+)}/g,function(m,p){return c[p];})};
return {
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
# encoding=utf-8 | |
# Obtener el dígito verificador del RUT en Python. | |
# | |
# La función recibe el RUT como un entero, | |
# y entrega el dígito verificador como un entero. | |
# Si el resultado es 10, el RUT es "raya k". | |
from itertools import cycle |
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
openssl pkcs7 -print_certs -in old.p7b -out new.crt | |
# openssl pkcs7 -print_certs -in old.p7b -out new.cer |
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
set listchars=tab:→\ ,trail:␣,extends:…,eol:⏎ | |
set listchars=tab:→\ ,trail:␣,precedes:«,extends:»,eol:⏎ | |
set listchars=tab:→\ ,trail:·,precedes:«,extends:»,eol:¶ | |
set listchars=tab:‣\ ,trail:·,precedes:«,extends:»,eol:¬ | |
set listchars=tab:␋\ ,trail:␠,precedes:«,extends:»,eol: | |
set listchars=tab:>-,trail:.,precedes:<,extends:>,eol:$ |
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
# remember to add | |
#PermitTunnel yes | |
# in /etc/ssh/sshd_config | |
# create tun device on both machines | |
# ref: http://www.k336.org/2013/04/non-root-ssh-vpn.html | |
sudo ip tuntap add dev tun0 mode tun user oxyflour group oxyflour | |
# delete tun | |
sudo ip tuntap del dev tun0 mode tun |
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
# Charlton Trezevant's Zoomin DNSMasq Config - Version 1.0 | |
# Having a large local cache speeds up subsequent DNS queries significantly (from several hundred msec to around 25-30) | |
# You may need to adjust this depending on the amount of free space you have | |
cache-size=10000 | |
# This ensures local reverse lookup queries are never sent upstream (e.g. dig +noall +answer -x 10.0.1.1) | |
bogus-priv | |
# Names without a dot or other domain part will also not be forwarded upstream | |
domain-needed | |
# We won't need dnsmasq to overwrite the system's resolv.conf, as we have our own cache. |
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
Here we write upgrading notes for brands. It's a team effort to make them as
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 com.acme.todo; | |
import oracle.ucp.jdbc.PoolDataSource; | |
import oracle.ucp.jdbc.PoolDataSourceFactory; | |
import javax.sql.DataSource; | |
import java.util.Properties; | |
public class DataSourceFactory { | |
public static DataSource createDataSource(String datasourceConfigFile) throws Exception { |
OlderNewer