Skip to content

Instantly share code, notes, and snippets.

💭
Decentralizing...

Eric Muyser ericmuyser

💭
Decentralizing...
Block or report user

Report or block ericmuyser

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@atraver
atraver / ServerRequestManager.cs
Created Jun 20, 2016
UnityWebRequest Dispose example
View ServerRequestManager.cs
private IEnumerator ExecuteRequest<T>(BuildRequestDelegate builder, ResponseDelegate<T> callback,
Action cancelCallback, RequestOptions requestOptions)
{
using(UnityWebRequest serverRequest = builder())
{
bool showActivityIndicator = ((requestOptions & RequestOptions.ShowActivityIndicator) == RequestOptions.ShowActivityIndicator);
bool forceRetry = ((requestOptions & RequestOptions.ForceRetry) == RequestOptions.ForceRetry);
float startTime = Time.realtimeSinceStartup;
yield return serverRequest.Send();
View Palindrome.js
//=====================
// Palindrome
//=====================
function removeSpecialChars(str){
return str.replace(/[^A-Z0-9]/ig, "");
}
function lowerCase(str){
return str.toLowerCase();
}
View a-increment.js
var dom = Bloop.dom;
var Box = Bloop.createClass({
getInitialState: function() {
return { number: 0 };
},
updateNumber: function() {
this.state.number++;
},
@dideler
dideler / bootstrapping.md
Last active Nov 25, 2019
Bootstrapping - a list of useful resources to get up and running quickly
View bootstrapping.md

Welcome!

UPDATE: This list is no longer maintained. I've moved it to its own repo so you can send suggestions as Pull Requests. https://github.com/dideler/bootstrapping/

For feedback or suggestions, please send a tweet (@dideler). Gist comments don't notify me. Pull requests aren't possible with gists (yet), so I don't recommend forking because then I can't easily get the change.

Starring this gist will give me an idea of how many people consider this list useful.

@Josh-Miller
Josh-Miller / landing.js
Created May 26, 2011 — forked from anonymous/landing.js
updating data on first window load
View landing.js
/* UPDATING DATA */
// 1. compare dates in two update files (if OK internet connection)
var update = Titanium.App.Properties.getString('update');
if (Titanium.Network.online && update == 'YES') {
var newUpdatesFile = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory,'newUpdates.txt');
var savedFile = Titanium.Filesystem.getFile(Titanium.Filesystem.applicationDataDirectory+Titanium.Filesystem.separator,'lastUpdated.txt');
var lastUpdatedDate = savedFile.read();
var newUpdatesDate = newUpdatesFile.read();
@romannurik
romannurik / centered_triangle.html
Created May 3, 2011
A simple CSS trick to create a horizontally- or vertically-centered 'selected' callout triangle using zero images.
View centered_triangle.html
<!DOCTYPE html>
<html>
<head>
<style>
body {
margin: 40px;
}
a {
display: inline-block;
@dtjm
dtjm / file-dialog-filters.diff
Created Jul 26, 2010
A script to install qcachegrind (the QT version of KCacheGrind) from the source tree at the KDE project. It will also install QT from homebrew with the required dependencies (which takes about 2 hours).
View file-dialog-filters.diff
Index: qcachegrind/qcgtoplevel.cpp
===================================================================
--- qcachegrind/qcgtoplevel.cpp (revision 1155013)
+++ qcachegrind/qcgtoplevel.cpp (working copy)
@@ -792,7 +792,7 @@
file = QFileDialog::getOpenFileName(this,
tr("Open Callgrind Data"),
_lastFile,
- tr("Callgrind Files (callgrind.*)"));
+ tr("Cachegrind Files (*cachegrind.*);;Callgrind Files (*callgrind.*);;All Files (*)"));
You can’t perform that action at this time.