Skip to content

Instantly share code, notes, and snippets.

View jsantanders's full-sized avatar
🎯
Focused

Jesus Santander jsantanders

🎯
Focused
View GitHub Profile
@chrisguitarguy
chrisguitarguy / logs.py
Created December 19, 2011 16:44
A simple python script to email myself server logs. Meant to run as a cron job.
import argparse
import os
import smtplib
from email import Encoders
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.Utils import formatdate
@kevinSuttle
kevinSuttle / meta-tags.md
Last active May 12, 2024 15:28 — forked from lancejpollard/meta-tags.md
List of Usable HTML Meta and Link Tags
@agarzon
agarzon / index.html
Last active April 5, 2022 23:44
My Html5 template with Jquery and Bootstrap from CDN
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Project Title</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
@digitaljhelms
digitaljhelms / gist:4287848
Last active June 11, 2024 22:12
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@phillipgreenii
phillipgreenii / README.md
Last active May 29, 2024 07:10
Running NPM Scripts through maven

I am in the process of introducing single page applications to where I work. For development, using node based build tools is much easier for the single page applications. However, the build process for our organization is based upon maven. Our solution started with the maven plugin frontend-maven-plugin. It worked great at first, but then we ran into a situation that I couldn't make work with it.

As stated before, at our organization, we have the older ecosystem which is maven and the newer ecosystem which is node. Our goal was to keep the hacking to a minimum. We did this by putting all of the hacks into a single super node based build file. This is what maven calls and the reason frontend-maven-plugin wasn't sufficient. The super node based build script calls all of the other build scripts by spawning npm run. Try as I might, I could not figure out how to make the spawn work. front-end-maven-plugin downloads npm

@alfeugds
alfeugds / CurrencyConverter.cs
Last active July 13, 2023 06:01
Xamarin Forms Currency Mask for Entry fields
using System;
using System.Globalization;
using System.Text.RegularExpressions;
using Xamarin.Forms;
namespace MyProject.Util
{
/// <summary>
/// Converter for using in Entry fields for masked input of currency.
/// <para>The binded property must be of type decimal, and must invoke the PropertyChangedEventArgs event whenever the value is changed, so that the desired mask behavior is kept.</para>
@kriscooke
kriscooke / github-pages-101.md
Last active February 21, 2021 17:53
GitHub Pages 101 aka. free hosting for all your public demos

GitHub Pages, aka. free hosting for all your public demos:

Without your writing any webserver code, GitHub can recognize specifically-named repos/branches and will serve a static page (including HTML/CSS/JS and other static files) at a certain GitHub-based URL. This means free hosting for your public demos, and makes it really easy to host a doc/demo site associated with each of your repositories. You can even set it up with a custom domain.

User Page (or Organization)

  • Accessible at: yourusername.github.io
  • GitHub automatically reserves this URL for every user and organization to use as their User page, although nothing is published there until you publish.
  • To deploy a static site to this URL:
    1. Create a Github repo with the exact name: yourusername.github.io
  1. Commit an index.html in the root folder to the master branch and push. (From the index page you can link to other folders/files as usual)
@sethbunke
sethbunke / pandas-dummy-variables.txt
Last active May 24, 2019 23:15
Simple example of creating dummy variables using Python Pandas
#import pandas and numpy
import pandas as pd
import numpy as np
#create dataframe with some random data
df = pd.DataFrame(np.random.rand(10, 2) * 10, columns=['Price', 'Qty'])
#add a column with random string values that would need to have dummy variables created for them
df['City'] = [np.random.choice(('Chicago', 'Boston', 'New York')) for i in range(df.shape[0])]
@ereli
ereli / countries.sql
Last active June 6, 2024 14:22 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes. PostgreSQL compatible
CREATE SEQUENCE country_seq;
CREATE TABLE IF NOT EXISTS country (
id int NOT NULL DEFAULT NEXTVAL ('country_seq'),
iso char(2) NOT NULL,
name varchar(80) NOT NULL,
nicename varchar(80) NOT NULL,
iso3 char(3) DEFAULT NULL,
numcode smallint DEFAULT NULL,
phonecode int NOT NULL,