Skip to content

Instantly share code, notes, and snippets.

Swanman lynatan

Block or report user

Report or block lynatan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ForUsingSample.pas
uses
ForUsing;
type
TFoo = class
private
FValue: Integer;
public
constructor Create(Value: Integer);
destructor Destroy; override;
View ForUsing.pas
unit ForUsing;
interface
type
TUsing<T: class> = record
private
type
TEnumerator = class
private
View addbutton.js
// ==UserScript==
// @name モーメントの編集で一番上に移動するボタンを追加するやつ
// @namespace http://lyna.space/
// @version 0.1
// @description Twitterのモーメント編集画面に「ツイートを一番上に移動するボタン(⏫)」を追加します。
// @author Lyna
// @match https://twitter.com/i/moments/edit/*
// @grant none
// ==/UserScript==
View RioGetItFix.pas
unit RioGetItFix;
interface
procedure Register;
implementation
uses
Winapi.Windows, System.SysUtils, Vcl.Themes;
@lynatan
lynatan / USushiBreak.pas
Last active Dec 18, 2016
TEditControl内にあるTImageListの画像の置き換えサンプル
View USushiBreak.pas
unit USushiBreak;
interface
uses
System.Classes, Vcl.Controls, Vcl.Graphics, Vcl.Forms, ToolsAPI;
procedure Register;
implementation
View Lyna.Generators.pas
unit Lyna.Generators;
interface
uses
SysUtils, Rtti, TypInfo;
type
TRange = record
strict private
View OpOverloadWithGenerics.pas
type
TObjectHelper = class helper for TObject
public
class function &&op_LogicalOr<T: class>(A, B: T): T; static;
end;
class function TObjectHelper.&&op_LogicalOr<T>(A, B: T): T;
begin
if A <> nil then
Result := A
@lynatan
lynatan / Project1.dpr
Created Sep 11, 2016
Use operator overloading for classes with non-ARC compiler
View Project1.dpr
program Project1;
{$APPTYPE CONSOLE}
uses
System.SysUtils, System.Classes, System.Types, Vcl.Dialogs;
type
TStringListEx = class(TStringList)
public
You can’t perform that action at this time.