Skip to content

Instantly share code, notes, and snippets.

View Athari's full-sized avatar
🐆

Alexander Prokhorov Athari

🐆
View GitHub Profile
@Athari
Athari / gist:5570726
Created May 13, 2013 19:18
Decompiled StringBuilder from .NET 3.5
// Type: System.Text.StringBuilder
// Assembly: mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
// Assembly location: C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll
using System;
using System.Diagnostics;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Serialization;
@Athari
Athari / gist:5570745
Created May 13, 2013 19:19
TStringBuilder from Delphi XE3
type
TStringBuilder = class
private const
DefaultCapacity = $10;
private
function GetCapacity: Integer;
procedure SetCapacity(Value: Integer);
function GetChars(Index: Integer): Char;
procedure SetChars(Index: Integer; Value: Char);
function GetLength: Integer; inline;
@Athari
Athari / gist:1c147ba151cd045c7b91
Created April 21, 2015 16:05
FVD Speed Dial - User Style: no search bar, fixed design
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
@-moz-document url("about:fvdsddials") {
/* Hide search bar */
#searchBar {
display: none !important;
}
/* Bigger group headers, fixed padding */
#groups_list label {
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media.Imaging;
class Program
{
[STAThread]
static void Main ()
{
@Athari
Athari / stackexchangeatom.php
Created May 15, 2015 10:23
Stack Exchange Answers Atom Feed
<?php
function oops ($message = '')
{
http_response_code(400);
die($message);
}
function get_json ($url)
{
@Athari
Athari / output
Last active February 27, 2016 22:15
LINQ for PHP comparison: YaLinqo vs Ginq vs Pinq performance (see https://github.com/Athari/YaLinqoPerf)
Iterating over 1000 ints
------------------------
PHP [for] 0.00006 sec x1.0 (100%)
PHP [array functions] 0.00011 sec x1.8 (+83%)
YaLinqo 0.00022 sec x3.7 (+267%)
Ginq 0.00077 sec x12.8 (+1183%)
Pinq 0.00040 sec x6.7 (+567%)
Generating array of 1000 integers
---------------------------------
@Athari
Athari / App.xaml.cs
Created July 26, 2016 19:06
AwaitableCommandExample by Vlad@RuSO
using System;
using System.Threading;
using System.Windows;
using System.Windows.Input;
namespace AwaitableCommandExample
{
public partial class App
{
protected override async void OnStartup(StartupEventArgs e)
@Athari
Athari / App.xaml
Created July 26, 2016 23:44
AwaitableCaliburnExample
<Application x:Class="AwaitableCaliburnExample.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:AwaitableCaliburnExample">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Styles.xaml"/>
<ResourceDictionary>
<local:AppBootstrapper x:Key="Bootstrapper"/>
@Athari
Athari / ReadMe.md
Last active August 14, 2023 19:51
[User Style] e621.net — Tricksta Esix

[![Screenshot]][Screenshot]

[![Install directly with Stylus][Shield Stylus]][CSS]

Features

  1. Tricksta's Esix on the front page of e621.net as a mascot.
  2. Restyled controls on the front page to match the image.
  3. Small Esix at the bottom of each page.