Skip to content

Instantly share code, notes, and snippets.

View peppy's full-sized avatar

Dean Herbert peppy

View GitHub Profile
@peppy
peppy / pWebRequest.cs
Created August 31, 2015 13:20
Broken code (AddFile fails with byte[] around 50k or more)
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using System.Threading;
using Newtonsoft.Json;
namespace osu_common.Helpers
{
@peppy
peppy / gist:1235731
Created September 22, 2011 19:15
osu! easing functions
//used for easing = 1
internal static float easeInVal(float currTime, float start, float end, float duration)
{
return duration == 0 ? start : MathHelper.Lerp(end, start, (float) Math.Pow(1 - currTime/duration, 2));
}
//used for easing = 2
internal static float easeOutVal(float currTime, float start, float end, float duration)
{
return duration == 0 ? start : MathHelper.Lerp(start, end, (float) Math.Pow(currTime/duration, 2));
@peppy
peppy / a.js
Created March 21, 2012 11:49
A J A X
function addToBin(itemId, homepage)
{
$("html").append("<iframe style='display:none' src='" + baseScriptPath + "bin_add.asp?p=" + itemId + "'></iframe>");
}
<!-- dean -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>
<script type="text/javascript" src="http://code.jquery.com/ui/1.8.18/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://cms.ebooks.com/admin/d2/trudaliser2.user.js"></script>
<!-- /dean -->
internal bool IsRetarded()
{
if (sliderCurveSmoothLines == null || cumulativeLengths == null)
return false;
float legalDistance = HitObjectManager.HitObjectRadius * 1.0f;
float scanDistance = HitObjectManager.HitObjectRadius * 4.0f;
for (int x = 0; x < sliderCurveSmoothLines.Count; x++)
{
@peppy
peppy / snippet.txt
Created March 29, 2012 07:45
xtrabackup assertion fail
xtrabackup: tables regcomp(osu.phpbb_users): Success
xtrabackup version 1.6.5 for Percona Server 5.1.59 unknown-linux-gnu (x86_64) (revision id: undefined)
xtrabackup: uses posix_fadvise().
xtrabackup: cd to /var/lib/mysql
xtrabackup: Target instance is assumed as followings.
xtrabackup: innodb_data_home_dir = ./
xtrabackup: innodb_data_file_path = ibdata1:10M:autoextend
xtrabackup: innodb_log_group_home_dir = ./
xtrabackup: innodb_log_files_in_group = 2
@peppy
peppy / snippet.txt
Created April 8, 2012 15:28
crash1
Process: Sublime Text 2 [92213]
Path: /Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2
Identifier: com.sublimetext.2
Version: Beta, Build 2193 (2193)
Code Type: X86-64 (Native)
Parent Process: launchd [256]
Date/Time: 2012-04-08 23:24:54.348 +0800
OS Version: Mac OS X 10.7.3 (11D50)
Report Version: 9
@peppy
peppy / snippet.txt
Created April 8, 2012 15:29
crash2
Process: Sublime Text 2 [96012]
Path: /Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2
Identifier: com.sublimetext.2
Version: Beta, Build 2193 (2193)
Code Type: X86-64 (Native)
Parent Process: launchd [256]
Date/Time: 2012-04-08 23:27:45.128 +0800
OS Version: Mac OS X 10.7.3 (11D50)
Report Version: 9
Active connections: 61111
server accepts handled requests
57953057 57952201 76938193
Reading: 3535 Writing: 4648 Waiting: 52928
@peppy
peppy / syslog.txt
Created January 25, 2013 03:21
Percona Server 5.5.28-29.1-log crash
Jan 24 14:06:05 db mysqld: 20:06:05 UTC - mysqld got signal 11 ;
Jan 24 14:06:05 db mysqld: This could be because you hit a bug. It is also possible that this binary
Jan 24 14:06:05 db mysqld: or one of the libraries it was linked against is corrupt, improperly built,
Jan 24 14:06:05 db mysqld: or misconfigured. This error can also be caused by malfunctioning hardware.
Jan 24 14:06:05 db mysqld: We will try our best to scrape up some info that will hopefully help
Jan 24 14:06:05 db mysqld: diagnose the problem, but since we have already crashed,
Jan 24 14:06:05 db mysqld: something is definitely wrong and this may fail.
Jan 24 14:06:05 db mysqld: Please help us make Percona Server better by reporting any
Jan 24 14:06:05 db mysqld: bugs at http://bugs.percona.com/
Jan 24 14:06:05 db mysqld: