Skip to content

Instantly share code, notes, and snippets.

View gaissa's full-sized avatar

gaissa gaissa

View GitHub Profile
/**
*Submitted for verification at Etherscan.io on 2021-09-05
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// [MIT License]
/// @title Base64
// SPDX-License-Identifier: MIT
// Source:
// https://github.com/ensdomains/ens-contracts/blob/master/contracts/ethregistrar/StringUtils.sol
pragma solidity >=0.8.4;
library StringUtils {
/**
* @dev Returns the length of a given string
*
* @param s The string to measure the length of

Keybase proof

I hereby claim:

  • I am gaissa on github.
  • I am gaissa (https://keybase.io/gaissa) on keybase.
  • I have a public key ASD2kKJxipo-asB1E6aSNHechREdQBJpjflyx93KicG1bgo

To claim this, I am signing this object:

git rm --cached `git ls-files -i --exclude-from=.gitignore`
@gaissa
gaissa / howto-manually-add-trust-cert-to-rubygems.md
Created October 14, 2015 10:25
Workaround RubyGems' SSL errors on Ruby for Windows (RubyInstaller)

SSL upgrades on rubygems.org and RubyInstaller versions

UPDATE 2014-12-21: RubyGems 1.8.30, 2.0.15 and 2.2.3 have been released. It requires manual installation, please see instructions below.


Hello,

If you reached this page, means you've hit this SSL error when trying to

@gaissa
gaissa / gist:9bb0ed65d1f4fff94d04
Created March 22, 2015 14:49
remove 'onclick' this way... :)
jQuery('<SELECTOR>').prop("onclick", null).attr("onclick", null);
<?php
/*
* Virtual Themed Page class
*
* This class implements virtual pages for a plugin.
*
* It is designed to be included then called for each part of the plugin
* that wants virtual pages.
*
* It supports multiple virtual pages and content generation functions.
@gaissa
gaissa / sort array by value
Last active April 15, 2017 07:47
sort array by value
private function sort_array_by_value(&$array, $subfield)
{
$sortarray = array();
foreach ($array as $key => $row)
{
$sortarray[$key] = $row[$subfield];
}
array_multisort($sortarray, SORT_ASC, $array);
<?php
/**
* Abstract class which has helper functions to get data from the database
*/
abstract class Base_Custom_Data
{
/**
* The current table name
*
<?php
// Variables used in this script:
// $summary - text title of the event
// $datestart - the starting date (in seconds since unix epoch)
// $dateend - the ending date (in seconds since unix epoch)
// $address - the event's address
// $uri - the URL of the event (add http://)
// $description - text description of the event
// $filename - the name of this file for saving (e.g. my-event-name.ics)
//