Skip to content

Instantly share code, notes, and snippets.

@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@darktable
darktable / SavWav.cs
Created April 6, 2012 05:01
Unity3D: script to save an AudioClip as a .wav file.
// Copyright (c) 2012 Calvin Rien
// http://the.darktable.com
//
// This software is provided 'as-is', without any express or implied warranty. In
// no event will the authors be held liable for any damages arising from the use
// of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
@asus4
asus4 / DownloadManager.cs
Created April 25, 2012 14:32
Unity DownloadManager
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
/**
DownloadManager
@author koki ibukuro
*/
public class DownloadManager : MonoBehaviour , System.IDisposable {
// using classes
@nickbudi
nickbudi / README.md
Last active February 17, 2024 14:25
Budi's Counter-Strike: Global Offensive config

Budi's CS:GO Config

This is my constantly updated CS:GO autoexec config. Changelogs can be found under revisions here

Put autoexec.cfg in ...\Steam\steamapps\common\Counter-Strike Global Offensive\csgo\cfg or take what you want from it and add to your autoexec config!

After the Wild West Simulator 2015 update, video.txt needs to be put in ...\Steam\userdata\<Steam3 ID>\730\local\cfg

Launch Options

@lifthrasiir
lifthrasiir / index.html
Last active October 4, 2017 14:44
K-Shoot MANIA to EffectDrive/SDVXviewer converter
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>K-Shoot MANIA to EffectDrive/SDVXviewer converter</title>
</head>
<body>
<h1><a href="http://kshoot.client.jp/">K-Shoot MANIA</a> to <a href="http://effectdrive.web.fc2.com/">EffectDrive</a>/<a href="http://sdvxviewer.wiki.fc2.com/">SDVXviewer</a> converter</h1>
<table border="1" width="80%" style="text-align:center">
<tr><th width="50%">K-Shoot MANIA pattern (<code>*.txt</code>) here</th><th width="50%">Save this to EffectDrive's <code>Drv\*\*.drv</code></th></tr>
@tsubaki
tsubaki / JsonSplitSprite.cs
Last active March 21, 2021 22:16
Json(exported with texture packer) -> unity 2d Multiple sprite . (request minijson https://gist.github.com/darktable/1411710)
// --
// The MIT License
//
// Copyright (c) 2013 tatsuhiko yamamura
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
@amowu
amowu / GetStreamingAssetsPath.cs
Created December 25, 2013 08:24
Get Unity StreamingAssets file path with Android and iOS.
// Put your file to "YOUR_UNITY_PROJ/Assets/StreamingAssets"
// example: "YOUR_UNITY_PROJ/Assets/StreamingAssets/db.bytes"
string dbPath = "";
if (Application.platform == RuntimePlatform.Android)
{
// Android
string oriPath = System.IO.Path.Combine(Application.streamingAssetsPath, "db.bytes");
@markheath
markheath / AudioPlaybackEngine.cs
Created February 3, 2014 13:42
FireAndForget NAudio Sample
using System;
using NAudio.Wave;
using NAudio.Wave.SampleProviders;
namespace FireAndForgetAudioSample
{
class AudioPlaybackEngine : IDisposable
{
private readonly IWavePlayer outputDevice;
private readonly MixingSampleProvider mixer;
@Chaser324
Chaser324 / GitHub-Forking.md
Last active May 13, 2024 11:18
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

@mateogianolio
mateogianolio / srt-to-json.js
Last active September 21, 2021 14:51
converts an SRT file into JSON
var fs = require('fs');
fs.readFile('subtitle.srt', function(error, data) {
if(error)
throw error;
var text = data.toString();
var lines = text.split('\n');
var output = [];