Skip to content

Instantly share code, notes, and snippets.

View dlively1's full-sized avatar

Dan Lively dlively1

View GitHub Profile
@dlively1
dlively1 / snippets.cson
Last active November 3, 2015 16:36
Salesforce Lightning Component Atom Snippets
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
public class CircularProgressDrawable extends Drawable
implements Animatable {
private static final Interpolator ANGLE_INTERPOLATOR = new LinearInterpolator();
private static final Interpolator SWEEP_INTERPOLATOR = new DecelerateInterpolator();
private static final int ANGLE_ANIMATOR_DURATION = 2000;
private static final int SWEEP_ANIMATOR_DURATION = 600;
private static final int MIN_SWEEP_ANGLE = 30;
private final RectF fBounds = new RectF();
@dlively1
dlively1 / es.sh
Created April 30, 2014 15:23 — forked from rajraj/es.sh
cd ~
sudo yum update
sudo yum install java-1.7.0-openjdk.i686 -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.9.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser

cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch and replace wget link below
# NEW WAY / EASY WAY
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.9.deb
sudo dpkg -i elasticsearch-0.90.9.deb
@dlively1
dlively1 / program.cs
Created November 14, 2013 05:02
using linq to filter a results set through the API
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SugarRest;
using SugarRest.Exceptions;
using SugarRest.Model;
using SugarRest.Extensions;
namespace SugarRestTesting
@dlively1
dlively1 / program.cs
Created November 5, 2013 20:43
Create Account with multi-select value
class Program
{
static void Main(string[] args)
{
string url = "";
string username = "";
string passsword = "";
Console.WriteLine("Starting test....");
@dlively1
dlively1 / gist:5858513
Last active December 26, 2021 17:36
Sugar 7 Web Services using Guzzle PHP
<?php
require_once 'vendor/autoload.php';
use Guzzle\Http\Client;
$user = '<<user>>';
$password = '<<password>>';
$url = '<<baseurl>>/rest/v10/';
$client = new Client($url);
@dlively1
dlively1 / stateList.php
Last active December 14, 2015 06:29
List of US states and Canadian provinces in abbr => long format
<?php
array(
'AL' => 'Alabama',
'AK' => 'Alaska',
'AZ' => 'Arizona',
'AR' => 'Arkansas',
'CA' => 'California',
'CO' => 'Colorado',
'CT' => 'Connecticut',
@dlively1
dlively1 / SnapShot.py
Created January 10, 2013 21:14
Amazon EC2 EBS volume snapshot
import boto
# variable settings for instance
snapshots = [("vol-ID", 7)]
instanceID = 'ID'
description = "automated backup"
print "Starting Snapshot Process"
#credentials from boto.cfg