Skip to content

Instantly share code, notes, and snippets.

View jwstl's full-sized avatar

Jason White jwstl

View GitHub Profile
@malarkey
malarkey / Contract Killer 3.md
Last active May 24, 2024 23:38
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@JISyed
JISyed / MoveCamera.cs
Last active November 29, 2022 11:24
Camera movement script in Unity3D. Supports rotating, panning, and zooming. Attach to the main camera. Tutorial explaining code: http://jibransyed.wordpress.com/2013/02/22/rotating-panning-and-zooming-a-camera-in-unity/
// Credit to damien_oconnell from http://forum.unity3d.com/threads/39513-Click-drag-camera-movement
// for using the mouse displacement for calculating the amount of camera movement and panning code.
using UnityEngine;
using System.Collections;
public class MoveCamera : MonoBehaviour
{
//
// VARIABLES
@andrewconnell
andrewconnell / SharePoint 2013 SPA UX Template - Header
Created February 18, 2014 10:56
HTML template of the header for used to create a SharePoint 2013 Hosted App (SPH) Single Page App (SPA).
<div id="s4-titlerow" class="ms-dialogHidden" style="display:block;">
<div id="titleAreaBox" class="ms-noList ms-table ms-core-tableNoSpace">
<div id="titleAreaRow" class="ms-tableRow">
<div id="siteIcon" class="ms-tableCell ms-verticalAlignTop" style="width:180px;">
app logo goes here
</div>
<div class="ms-breadcrumb-box ms-tableCell ms-verticalAlignTop">
<div class="ms-breadcrumb-top">
<div class="ms-breadcrumb-dropdownBox" style="display:none;">
<span id="DeltaBreadcrumbDropdown"></span>
@joecih
joecih / HighChartDemo1.js
Last active November 9, 2016 20:38
High Chart Demo for SharePoint 2013 [ https://jsfiddle.net/JoeciH/asdstm93/ ]
<script type="text/javascript" src="/Style%20Library/jquery-1.11.2.js"></script>
<script type="text/javascript" src="/Style%20Library/highcharts.js"></script>
<script type="text/javascript">
var splistitems;
var seriesarray = new Array();
ExecuteOrDelayUntilScriptLoaded(GetChartData, "sp.js");
function GetChartData() {
@ProGM
ProGM / find_useless_resources_unity.sh
Last active January 8, 2022 10:04
A useful script to identify Unity resource that are not referenced in the project
#!/bin/bash
GREEN='\033[0;32m'
RED='\033[0;31m'
YELLOW='\033[0;33m'
NC='\033[0m'
rm unused_files.log &> /dev/null
grep -r . --include=\*.meta --exclude=*{Editor,Gizmos}* -e 'guid' | while read line; do
<Query Kind="Program">
<NuGetReference>Octokit</NuGetReference>
<NuGetReference>Octokit.Reactive</NuGetReference>
<NuGetReference>Rx-Main</NuGetReference>
<Namespace>Octokit</Namespace>
<Namespace>System.Linq</Namespace>
<Namespace>System.Reactive.Linq</Namespace>
<Namespace>System.Threading.Tasks</Namespace>
</Query>
@vgrem
vgrem / createNewDiscussionReply.js
Created September 12, 2016 12:13
Demonstrates how to create a message (reply) in Discussion Board via SharePoint REST API
function executeJson(options)
{
var headers = options.headers || {};
var method = options.method || "GET";
headers["Accept"] = "application/json;odata=verbose";
if(options.method == "POST") {
headers["X-RequestDigest"] = $("#__REQUESTDIGEST").val();
}
var ajaxOptions =
@posener
posener / go-shebang-story.md
Last active March 29, 2024 08:38
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

[System.Serializable]
public struct RangedFloat
{
public float minValue;
public float maxValue;
public RangedFloat(float minValue, float maxValue)
{
this.minValue = minValue;
this.maxValue = maxValue;
@dudelis
dudelis / k2-listview-checkboxes.js
Last active May 4, 2018 20:50
K2: Select Listview rows with checkboxes
//You need to do the following for the code to work:
//1. Add Literal datalabel to the list view and call it 'dlblScript'.
//2. Add a new column into the list view, add literal datalabel there and add a piece of the following html inside:
<input type="checkbox" class="custom-box"/>
//3. Add the following js into the dlblScript:
<script>
var contentTable = $("span[name='dlblScript']").closest('.grid').find('.grid-content-table')[0];
var observer = new MutationObserver(function(mutations){
$(contentTable).find('.custom-box').each(function(i, val){
if ($(this).prop('checked')){