Skip to content

Instantly share code, notes, and snippets.

View aldomendez's full-sized avatar

Aldo Mendez Reyes aldomendez

  • NovaLink
  • Matamoros Tamaulipas Mexico
View GitHub Profile
@aldomendez
aldomendez / sqlite.php
Created April 9, 2013 23:46
Sirve de prueba para saber si se cuenta con sqlite instalado en PHP, ademas de que sirve como base para hacer aplicaciones sencillas
<?php
try
{
//open the database
$db = new PDO('sqlite:dogsDb_PDO.sqlite');
//delete the table if exists so I can start with a fresh table
$db->exec("drop table if exists Dogs");
//create the database
@aldomendez
aldomendez / notifications.js
Created October 5, 2013 18:48
Notifications API
// Step 1: Check for Notifications API support
// check for notifications support
// you can omit the 'window' keyword
if (window.webkitNotifications) {
console.log("Notifications are supported!");
}
else {
console.log("Notifications are not supported for this Browser/OS version yet.");
}
// Step 2: Let the user grant permissions to a website to show notifications.

Presentacion de la base de datos

Seleccion

La base de datos que elegí, es una recopilacion de 24 horas de produccion, en la compañia en la que laboro, para un proceso en particular.

Contenido:

  • Tiempo de ciclo
  • Si pasó o falló
#!/bin/sh
### BEGIN INIT INFO
# Provides: myservice
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Put a short description of the service here
# Description: Put a long description of the service here
@aldomendez
aldomendez / designer.html
Last active August 29, 2015 14:16
designer
<link rel="import" href="../topeka-elements/category-images.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<link rel="import" href="../topeka-elements/category-icons.html">
<polymer-element name="my-element">
<template>
@aldomendez
aldomendez / _.md
Last active September 2, 2015 00:04
bonderDeadTimes
@aldomendez
aldomendez / index.html
Last active December 4, 2015 06:39
pomodoro
<div id="container" style="margin-top:50px;"></div>
<template class="column" id="template">
<div class="ui grid text container">
<div class="row">
<div class="column">
<h1>Pomodoro</h1>
<div class="ui centered card">
<div class="content">
<div class="header">
@aldomendez
aldomendez / README.md
Created January 27, 2016 19:06 — forked from mbostock/README.md
Underscore’s Equivalents in D3

Collections

each(array)

Underscore example:

_.each([1, 2, 3], function(num) { alert(num); });
<!DOCTYPE html>
<html>
<head>
<link href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.8/semantic.css" rel="stylesheet" type="text/css" />
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
.ui.card>.progress {
background:rgba(120, 202, 41, 1);
@aldomendez
aldomendez / gist:c68b70a16a6711f4f1f575499e61f625
Created April 9, 2016 03:27 — forked from rmondello/gist:b933231b1fcc83a7db0b
Exporting (iCloud) Keychain and Safari credentials to a CSV file

Exporting (iCloud) Keychain and Safari credentials to a CSV file

After my dad died, I wanted to be able to have access any of his online accounts going forward. My dad was a Safari user and used iCloud Keychain to sync his credentials across his devices. I don’t want to have to keep an OS X user account around just to access his accounts, so I wanted to export his credentials to a portable file.

This is the process I used to create a CSV file of his credentials in the format “example.com,user,pass”. This portable format would be pretty easy to import into 1Password or Safari in the future.

The way I went about this isn’t great; it opens up more opportunities for apps to control one’s Mac through Accessibility APIs, it writes plaintext passwords to disk, and it could use some cleaning up. A better approach might leverage the security command line tool that ships with OS X. That said, I found this method to be a fun illustration of what’s possible us