Skip to content

Instantly share code, notes, and snippets.

View dylanh724's full-sized avatar
🌐
imperium42.com

Dylan Hunt dylanh724

🌐
imperium42.com
View GitHub Profile
@HolyFot
HolyFot / ToggleC.cs
Last active March 15, 2024 22:42
Better Toggles for Unity UI (Down image, custom fade time, no deselect bug)
//Made by: HolyFot
//License: CC0 - https://creativecommons.org/share-your-work/public-domain/cc0/
//Note: ToggleC scripts must be childs of ToggleGroupC
//Note: "TargetGraphic" is a separate child image.
//Version 1.1 (Fix warnings & selection bug)
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.EventSystems;
using UnityEngine.UI;
using System.Collections;
using GameSparks;
using System;
/// <summary>
/// Custom wrapper around the NativeWebSocket from https://github.com/endel/NativeWebSocket
/// Intended to fix the issue of the GameSparks SDK not supporting .net4.x
/// </summary>
public class CustomGamesparksSocket : IGameSparksWebSocket
{
private NativeWebSocket.WebSocket socket = null;
#if !DISABLESTEAMWORKS
// Unity 32bit Mono on Windows crashes with ThisCall/Cdecl for some reason, StdCall without the 'this' ptr is the only thing that works..?
#if (UNITY_EDITOR_WIN && !UNITY_EDITOR_64) || (!UNITY_EDITOR && UNITY_STANDALONE_WIN && !UNITY_64)
#define STDCALL
#elif STEAMWORKS_WIN
#define THISCALL
#endif
namespace Steamworks
#if !DISABLESTEAMWORKS
// Unity 32bit Mono on Windows crashes with ThisCall/Cdecl for some reason, StdCall without the 'this' ptr is the only thing that works..?
#if (UNITY_EDITOR_WIN && !UNITY_EDITOR_64) || (!UNITY_EDITOR && UNITY_STANDALONE_WIN && !UNITY_64)
#define STDCALL
#elif STEAMWORKS_WIN
#define THISCALL
#endif
namespace Steamworks
@Jimbly
Jimbly / index.js
Last active February 1, 2024 13:41
Steam CD Key Batch query
/* jshint esversion: 6*/
const assert = require('assert');
const async = require('async');
const fs = require('fs');
let request = require('request');
const FileCookieStore = require('tough-cookie-filestore');
if (!fs.existsSync('cookies.json')) { fs.writeFileSync('cookies.json', '{}'); }
let j = request.jar(new FileCookieStore('cookies.json'));
request = request.defaults({ jar : j });
#!/usr/bin/python
import os
import sys
import csv
import datetime
import time
import twitter
def test():
@jobsamuel
jobsamuel / readme.md
Last active January 19, 2024 18:26
Run NodeJS as a Service on Ubuntu 14.04 LTS

Run NodeJS as a Service on Ubuntu 14.04 LTS

With Node you can write very fast JavaScript programs serverside. It's pretty easy to install Node, code your program, and run it. But > how do you make it run nicely in the background like a true server?

  • Go to /etc/init/
  • $ sudo vim yourapp.conf
  • Paste script.conf
  • $ sudo start yourapp
  • And when you wanna kill the process $ sudo stop yourapp
@Chaser324
Chaser324 / GitHub-Forking.md
Last active April 25, 2024 04:57
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@boucher
boucher / webhook-mailer.php
Created January 31, 2012 01:45
Stripe Webhook PHP Example
<?php
// SETUP:
// 1. Customize all the settings (stripe api key, email settings, email text)
// 2. Put this code somewhere where it's accessible by a URL on your server.
// 3. Add the URL of that location to the settings at https://manage.stripe.com/#account/webhooks
// 4. Have fun!
// set your secret key: remember to change this to your live secret key in production
// see your keys here https://manage.stripe.com/account