Skip to content

Instantly share code, notes, and snippets.

View eman1986's full-sized avatar

Ed Lomonaco eman1986

View GitHub Profile
@brianherbert
brianherbert / iso_array.php
Created January 27, 2012 07:35
ISO 3166-1 alpha-3 PHP Array
<?php
$iso_array = array(
'ABW'=>'Aruba',
'AFG'=>'Afghanistan',
'AGO'=>'Angola',
'AIA'=>'Anguilla',
'ALA'=>'Åland Islands',
'ALB'=>'Albania',
'AND'=>'Andorra',
'ARE'=>'United Arab Emirates',
@ozh
ozh / gist:4131243
Created November 22, 2012 13:44
Create dot files/directories (ie .file) on Windows

#How to create a .file or .folder on Windows

There are several ways

1. Rename

  • Create file.txt
  • Rename to .file., the last dot will be dropped, you'll have .file

Works the same with a file or a directory.

@bastman
bastman / build.properties
Created October 8, 2013 16:29
phing example tasks
project.environment.name=local
project.name=${phing.project.name}
dir.build_xml=${project.basedir}
project.host.default=${project.environment.name}.${project.name}.mydomain.com
dir.project=${dir.build_xml}/../../..
/*jslint continue:true*/
/**
* Adapted from {@link http://www.bulgaria-web-developers.com/projects/javascript/serialize/}
* Changes:
* Ensures proper URL encoding of name as well as value
* Preserves element order
* XHTML and JSLint-friendly
* Disallows disabled form elements and reset buttons as per HTML4 [successful controls]{@link http://www.w3.org/TR/html401/interact/forms.html#h-17.13.2}
* (as used in jQuery). Note: This does not serialize <object>
* elements (even those without a declare attribute) or
@joyrexus
joyrexus / README.md
Last active May 3, 2024 10:41 — forked from liamcurry/gist:2597326
Vanilla JS equivalents of jQuery methods

Sans jQuery

Events

// jQuery
$(document).ready(function() {
  // code
})
@HeathHopkins
HeathHopkins / ExtensionMethods.cs
Last active April 27, 2022 13:33
Xamarin.iOS Extension Methods
using System;
using MonoTouch.UIKit;
namespace System
{
public static class ExtensionMethods
{
public static UIColor ToUIColor(this string hexString)
{
hexString = hexString.Replace("#", "");
@aloisdeniel
aloisdeniel / Animation Fade
Last active October 11, 2022 19:10
Xamarin.iOS view common animations
public static void Fade (this UIView view, bool isIn, double duration = 0.3, Action onFinished = null)
{
var minAlpha = (nfloat)0.0f;
var maxAlpha = (nfloat)1.0f;
view.Alpha = isIn ? minAlpha : maxAlpha;
view.Transform = CGAffineTransform.MakeIdentity ();
UIView.Animate (duration, 0, UIViewAnimationOptions.CurveEaseInOut,
() => {
view.Alpha = isIn ? maxAlpha : minAlpha;
@rudyryk
rudyryk / Avatar.cs
Last active August 22, 2018 13:51
C# — Simple rounded avatar class example for Xamarin.Forms
//
// Avatar.cs
// Created by Alexey Kinev on 26 Feb 2015.
//
// Licensed under The MIT License (MIT)
// http://opensource.org/licenses/MIT
//
// Simple rounded avatar class example for Xamarin.Forms.
//
using System;
@ostinelli
ostinelli / jenkins_ci_on_ubuntu.md
Last active February 14, 2023 07:12
Setup Jenkins CI on Ubuntu.

Jenkins CI

Instructions on how to setup a secured Jenkins CI.

Install Jenkins

$ wget -q -O - https://jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
$ sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list$ .d/jenkins.list'
$ sudo apt-get update
$ sudo apt-get install jenkins
@martijn00
martijn00 / RecyclerViewActivity.cs
Last active March 18, 2024 22:13
Load more / endless scroll for Xamarin RecyclerView
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
var view = base.OnCreateView(inflater, container, savedInstanceState);
var recyclerView = view.FindViewById<RecyclerView>(Resource.Id.my_recycler_view);
if (recyclerView != null)
{
recyclerView.HasFixedSize = true;
var layoutManager = new LinearLayoutManager(Activity);