Skip to content

Instantly share code, notes, and snippets.

@Kimserey
Kimserey / .deps...npm...@openzeppelin...contracts@4.4.1...access...Ownable.sol
Created January 8, 2022 21:30
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
@Kimserey
Kimserey / convert_flv_mp4.sh
Created January 4, 2019 16:46
Convert flv to mp4 with ffmpeg
ffmpeg -i '2019-01-03 15-20-12.flv' -c copy output.mp4
@Kimserey
Kimserey / release.ps1
Last active April 1, 2018 06:27
Use Gitversion to find version of current branch, commit and tag to prepare for release
# Get the version from master branch by running gitversion.
# Make sure Gitversion is registered in PATH!
$version = gitversion /showvariable semver
# Update Directory.build.props version <version></version>.
# It dictates all *.dll versions.
$propsPath = "$pwd\Directory.build.props"
[xml]$props = Get-Content $propsPath
@Kimserey
Kimserey / restore-project-repo.cmd
Last active July 21, 2017 07:17
Cmd script with FOR IN and IF statements
echo OFF
cls
set BASE_DIR=C:\Projects\
FOR %%x IN (
repo1,
repo2) DO (
IF NOT EXIST "%BASE_DIR%\%%x.Service" (
git clone https://repo-site.com/%%x.Service
@Kimserey
Kimserey / program.cs
Created June 30, 2017 02:18
Distinct.Any
using System;
using System.Diagnostics;
using System.Linq;
using System.Threading;
namespace DistinctAny
{
class Program
{
static void Main(string[] args)
@Kimserey
Kimserey / npm cli
Created May 21, 2017 01:56
List top level installed packages
npm ls --depth=0
npm -g ls --depth=0
@Kimserey
Kimserey / routes.cs
Last active May 10, 2017 01:08
ASP.NET Core Routes
public class T1Controller : Controller
{
// This will not be found
[HttpGet]
public IEnumerable<string> Get()
{
return new string[] { "value1", "value2" };
}
}
@Kimserey
Kimserey / gulpfile.js
Created March 24, 2017 02:30
Gulp file with sass compilation and bootup of live-server
var gulp = require('gulp');
var sass = require('gulp-sass');
var exec = require('child_process').exec;
gulp.task('sass', function() {
gulp.src('scss/*.scss')
.pipe(sass())
.pipe(gulp.dest('.'));
});
LICEcap for http://www.cockos.com/licecap/
@Kimserey
Kimserey / index.html
Created March 11, 2017 11:08
Nav sticky
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example</title>
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
<link rel="stylesheet" href="bower_components/filament-sticky/fixedsticky.css" />
<style>
.fixedtop {