Skip to content

Instantly share code, notes, and snippets.

View parrainc's full-sized avatar

Carlos Parra parrainc

  • Dominican Republic
View GitHub Profile
public sealed class Singleton
{
private static readonly Lazy<Singleton>
lazy =
new Lazy<Singleton>
(() => new Singleton());
public static Singleton Instance { get { return lazy.Value; } }
$("#chkStatus").on('change', function() {
var newStatus = $(this).prop('checked');
$.ajax({
url: '/change-status/',
type: 'post',
data: { status: newStatus },
success: function(response) {
console.log("Everything ok!");
}.
error: function(xhr) {
@parrainc
parrainc / countryinfo.py
Created May 21, 2016 23:58 — forked from pamelafox/countryinfo.py
Python list of country codes, names, continents, capitals, and pytz timezones
countries = [
{'timezones': ['Europe/Andorra'], 'code': 'AD', 'continent': 'Europe', 'name': 'Andorra', 'capital': 'Andorra la Vella'},
{'timezones': ['Asia/Kabul'], 'code': 'AF', 'continent': 'Asia', 'name': 'Afghanistan', 'capital': 'Kabul'},
{'timezones': ['America/Antigua'], 'code': 'AG', 'continent': 'North America', 'name': 'Antigua and Barbuda', 'capital': "St. John's"},
{'timezones': ['Europe/Tirane'], 'code': 'AL', 'continent': 'Europe', 'name': 'Albania', 'capital': 'Tirana'},
{'timezones': ['Asia/Yerevan'], 'code': 'AM', 'continent': 'Asia', 'name': 'Armenia', 'capital': 'Yerevan'},
{'timezones': ['Africa/Luanda'], 'code': 'AO', 'continent': 'Africa', 'name': 'Angola', 'capital': 'Luanda'},
{'timezones': ['America/Argentina/Buenos_Aires', 'America/Argentina/Cordoba', 'America/Argentina/Jujuy', 'America/Argentina/Tucuman', 'America/Argentina/Catamarca', 'America/Argentina/La_Rioja', 'America/Argentina/San_Juan', 'America/Argentina/Mendoza', 'America/Argentina/Rio_Gallegos', 'America/Argentina/Ushuai
@parrainc
parrainc / docs style (bootstrap)
Created April 30, 2016 21:17 — forked from matthiasg/docs style (bootstrap)
the callouts from the bootstrap documentation
/* Side notes for calling out things
-------------------------------------------------- */
/* Base styles (regardless of theme) */
.bs-callout {
margin: 20px 0;
padding: 15px 30px 15px 15px;
border-left: 5px solid #eee;