Skip to content

Instantly share code, notes, and snippets.

View skibitsky's full-sized avatar

Gleb Skibitsky skibitsky

View GitHub Profile
pragma solidity ^0.4.18;
contract DGS is ERC20Interface {
string public constant NAME = "Dragonglass";
string public constant SYMBOL = "DGS";
uint public constant DECIMALS = 8;
uint256 supply = 0;
mapping(address => uint256) balances;
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/Assets/AssetStoreTools*
# OS Files
thumbs.db
desktop.ini
@skibitsky
skibitsky / uBlock filters
Last active April 14, 2019 12:15
My uBlock filters that removes more ads and some annoying interface parts. You can import a link to the gist raw as the custom filter list to keep it updated
! 8/2/2018, 10:57:49 AM https://currencio.co/ltc/eur/
currencio.co###ct_cxbIeHS_b:nth-of-type(1) > div > a[href^="https://apps2.ctnetpass2.com/clk"] > div
! 8/2/2018, 10:57:57 AM https://currencio.co/ltc/eur/
||files.ctnetfiles.com/pub/5901/15543.gif$image
! 8/2/2018, 10:58:04 AM https://currencio.co/ltc/eur/
||files.ctnetfiles.com/pub/5901/15550/index.html$subdocument
! 8/2/2018, 10:58:10 AM https://currencio.co/ltc/eur/
mail.yahoo.com
facebook.com
twitter.com
pinterest.com
tumblr.com
instagram.com
vine.co
flickr.com
meetup.com
ask.fm
/Applications/Caprine.app
/Applications/Binance.app
/Applications/Steam.app
/Applications/Discord.app
/Applications/FaceTime.app
/Applications/Tweetbot.app
/Applications/App Store.app
/Applications/Slack.app
/Applications/WhatsApp.app
/Applications/Telegram.app
@skibitsky
skibitsky / Antisaver.js
Created June 21, 2019 14:32
Antisaver userscript for Tampermonkey. It doesn't allow Safari to save page when ⌘ + S is pressed
// ==UserScript==
// @name Antisaver
// @version 0.1
// @description Doesn't allow Safari to save page when ⌘ + S is pressed
// @include *
// ==/UserScript==
(function() {
'use strict';
window.onkeydown = e => {if ((window.navigator.platform.match("Mac") ? e.metaKey : e.ctrlKey) && e.keyCode == 83) {e.preventDefault()}}
on alfred_script(q)
write_to_file(q, "/Users/gleb/.hyper_plugins/hyperalfred.txt", false)
tell application "Hyper" to activate
end alfred_script
on write_to_file(this_data, target_file, append_data)
try
tell application "System Events" to exists file target_file
if not the result then do shell script "> " & quoted form of target_file
set the open_target_file to open for access target_file with write permission
using System;
using System.Collections.Generic;
using System.Linq;
namespace com.skibitsky.components
{
// Component label interface
public interface IComponent
{
@skibitsky
skibitsky / Generic Singleton class.cs
Last active August 4, 2019 17:43
The class must have no public constructors to avoid singleton instance reassignment from outside. Reference: https://stackoverflow.com/a/46259014
public abstract class Singleton<T> where T : Singleton<T> {
private const string ErrorMessage = " must have a parameterless constructor and all constructors have to be NonPublic.";
private static T _instance = null;
public static T Instance => _instance ?? (_instance = Create());
protected Singleton() {
// Check for public constructors
var pconstr = typeof(T).GetConstructors(BindingFlags.Public | BindingFlags.Instance);
// Tell programmer to fix his stuff
if (pconstr.Any())
@skibitsky
skibitsky / Focus Start.txt
Last active August 20, 2019 08:11
Start script for Focus app. https://heyfocus.com/
#
# start — this script runs when a Focus session starts
#
osascript -e 'quit app "Discord"'
osascript -e 'quit app "Spark"'