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
@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
@Chaser324
Chaser324 / GitHub-Forking.md
Last active November 14, 2024 08:32
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

@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
#!/usr/bin/python
import os
import sys
import csv
import datetime
import time
import twitter
def test():
@Jimbly
Jimbly / index.js
Last active July 1, 2024 17:00
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 });
#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
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;
@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;
@robotdad
robotdad / vs_cpp_winget.md
Last active November 1, 2024 22:00
Installing VS C++ workloads with winget

This is a short outline of how to install the C++ workload with Visual Studio or the build tools using winget.

To find VS releases with winget use search. winget search buildtools

The install command will install the VS installer with the core of the selected product installed. That isn't much. So if you use either of these commands to insll VS or the build tools you will need to launch the VS installer afterwards and select the relevant C++ workloads you need.

winget install Microsoft.VisualStudio.2022.BuildTools

winget install Microsoft.VisualStudio.2022.Community