Skip to content

Instantly share code, notes, and snippets.

View xnt's full-sized avatar
Code. Learn. Help. Joke. Repeat.

Vicente Plata xnt

Code. Learn. Help. Joke. Repeat.
View GitHub Profile
@xnt
xnt / Hola.tsx
Last active July 20, 2020 04:21
import React from 'react';
interface HolaProps {
firstName: string;
lastName: string;
}
const Hola: React.FC<HolaProps> = ({firstName, lastName}) => (
<div>
<p>
import React from 'react';
import PropTypes from 'prop-types';
const Hola = ({firstName, lastName}) => (
<div>
<p>
Hola, {firstName} {lastName}!
</p>
</div>
);
type UserAddress = {
street: string;
number: number;
city: string;
country: string;
};
type UserData = {
firstName: string;
lastName: string;
{
"firstName": "John",
"lastName": "Doe",
"address": {
"street": "Evergreen Terrace",
"number": 742,
"city": "Springfield",
"country": "US"
}
}
{
"firstName": "John",
"lastName": "Doe",
"address": {
"street": "Evergreen Terrace",
"number": 742,
"city": "Springfield",
"country": "US"
}
}

Keybase proof

I hereby claim:

  • I am xnt on github.
  • I am vplata (https://keybase.io/vplata) on keybase.
  • I have a public key ASCZ2l2k7upbA2Y3KZoywPjvfuQ9Bh_6k-9A7IkWKKbcfwo

To claim this, I am signing this object:

#!/usr/bin/env ruby
# Unsophisticated but useful way of replacing spanish language characters on a bunch of html files
REPLACE_CHARACTERS = {
"á" => "&aacute;",
"é" => "&eacute;",
"í" => "&iacute;",
"ó" => "&oacute;",
"ú" => "&uacute;",
"Á" => "&Aacute;",
@xnt
xnt / dhlMonitor.sh
Created July 9, 2012 20:44
DHL Monitor
#!/bin/bash
# TODO: Lots and lots of things
interval=600
airwaybill=5199355888
baseurl='http://www.dhl.com/content/g0/en/express/tracking.shtml?brand=DHL&AWB='
tempFile=wgmonitor_tmp.html
noResultOutput='No result found for your DHL query. Please try again.'
while [ -z "${results_found}"]
@xnt
xnt / .desktop
Created June 14, 2012 05:57
Open Applications in Gnome using Sublime Text 2
##
# Open Applications in Gnome using Sublime Text 2
# Put in ~/.local/share/applications/.desktop
# Ref http://blog.10minutesoftech.com/customization/newopen-with-gnome/
##
[Desktop Entry]
Version=1.0
Type=Application
Terminal=false
@xnt
xnt / copiar_sinembargo.user.js
Created May 15, 2012 07:13
Copiar texto de SinEmbargo.mx, en vez de su mensaje de copyright
// ==UserScript==
// @name Copiar texto de SinEmbargo.mx
// @author Vicente Plata
// @description Permite copiar texto de SinEmbargo.mx
// @match http://www.sinembargo.mx/*
// ==/UserScript==
addLink=undefined;
document.oncopy=undefined;