Skip to content

Instantly share code, notes, and snippets.

View pridemusvaire's full-sized avatar
🎯
Focusing

Pride Musvaire pridemusvaire

🎯
Focusing
View GitHub Profile
@pridemusvaire
pridemusvaire / SP2010_create_list_item.html
Created July 13, 2017 19:50 — forked from havana59er/SP2010_create_list_item.html
Create a new list item in SharePoint 2010 using javascript
<div>
<label for="myAnnouncement">Announcement</label>
<input id="myAnnouncement" type="text" /><br />
<input type="button" value="Post Announcement" />
</div>
<script type="text/javascript" >
// Use this to delay execution until the file sp.js has loaded. Also a good way to keep your context free of globals.
ExecuteOrDelayUntilScriptLoaded(function() {
// get announcement text
@pridemusvaire
pridemusvaire / handlebars-helpers-templates.html
Created October 10, 2016 13:17 — forked from amitkumar/handlebars-helpers-templates.html
Useful Handlebars Helpers. Get specific array item, if equals filter
<script id="if_equals_example" type="text/x-handlebars-template">
{{#if_equals objectType 'message'}}
<div class="message">
Message
</div>
{{else}}
{{/if_equals}}
</script>
@pridemusvaire
pridemusvaire / find-in-json.js
Created October 8, 2016 13:53 — forked from iwek/find-in-json.js
Searching through JSON
//return an array of objects according to key, value, or key and value matching
function getObjects(obj, key, val) {
var objects = [];
for (var i in obj) {
if (!obj.hasOwnProperty(i)) continue;
if (typeof obj[i] == 'object') {
objects = objects.concat(getObjects(obj[i], key, val));
} else
//if key matches and value matches or if key matches and value is not passed (eliminating the case where key matches but passed value does not)
if (i == key && obj[i] == val || i == key && val == '') { //
@pridemusvaire
pridemusvaire / us_geo_chart_google
Created September 30, 2016 14:46 — forked from gerryster/us_geo_chart_google
US State Map using the GeoChart from the Google Chart Tools
// GeoChart from https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart
// Try out by pasting code into: https://code.google.com/apis/ajax/playground/?type=visualization#geo_chart
function drawVisualization() {
var data = google.visualization.arrayToDataTable([
['State', 'Foo Factor'],
['US-IL', 200],
['US-IN', 300],
['US-IA', 20],
@pridemusvaire
pridemusvaire / README.md
Created September 2, 2016 11:43 — forked from tywhang/README.md
Easily add Charts into Dashing with Chartjs (Line, Bar, Radar, Polar Area, Pie, Doughnut)

dashing-chartjs

An easy interface to use all of chartjs.org's charts.

Inspired by my own pain and suffering of trying to add a simple chart to dashing

Make awesome charts like these:

@pridemusvaire
pridemusvaire / wordFilter.cfm
Created August 30, 2016 15:10 — forked from stevereich/wordFilter.cfm
Form to demonstrate the bad word filter.cfc
<html>
<head>
<title>Bad Word Filter</title>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script language="JavaScript" type="text/javascript">
$(function(){
$filterBox = $('#filterBox');
$frmWords = $('#frmWords');
$thewords = $('#thewords');
$buttonCheck = $('#buttonCheck').click(function(){
@pridemusvaire
pridemusvaire / README.md
Created August 14, 2016 19:14 — forked from chrislkeller/README.md
Displaying data from a flat JSON file on a Handlebars.js template file rendered with AJAX.

Demo: ajax-handlebars

This repo's location has changed.

@pridemusvaire
pridemusvaire / v3-hello-email.php
Created July 15, 2016 11:02 — forked from sendgrid-gists/v3-hello-email.php
v3 "Hello World" for email, using SendGrid with PHP.
// using SendGrid's PHP Library
// https://github.com/sendgrid/sendgrid-php
<?php
// If you are using Composer
require 'vendor/autoload.php';
// If you are not using Composer (recommended)
// require("path/to/sendgrid-php/sendgrid-php.php");
$from = new SendGrid\Email("Example User", "test@example.com");

Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.

Key to the Keys

  • ⌘ : Command key
  • ⌃ : Control key
  • ⌫ : Delete key
  • ← : Left arrow key
  • → : Right arrow key
  • ↑ : Up arrow key
@pridemusvaire
pridemusvaire / How To Hide The Select Arrow On Firefox.md
Created June 14, 2016 12:42 — forked from joaocunha/How To Hide The Select Arrow On Firefox.md
How to hide <select> dropdown's arrow in Firefox when using "-moz-appearance: none;".

This is no longer a bug. I'm keeping the gist for historical reasons, as it helped to get it fixed. Make sure to read the notes by the end of the post.

How to remove hide the select arrow in Firefox using -moz-appearance:none;

TL;DR (or, the fix)

  1. Set -moz-appearance to none. This will "reset" the styling of the element;
  2. Set text-indent to 0.01px. This will "push" the text a tiny bit[1] to the right;