Skip to content

Instantly share code, notes, and snippets.

@fend25
fend25 / lab4
Last active December 29, 2015 17:49
lab4 template
.include "m8Adef.inc" ;
; = Macro ========================================
.MACRO Reset
RAM_Flush:
LDI ZL,Low(SRAM_START)
LDI ZH,High(SRAM_START)
CLR R16
Flush:
ST Z+, R16
// Медианная фильтрация
$('#btn-filtering-mediana').click(function (e) {
checkImageLoaded();
var gsImage2d = copyGrayScaleImage1dTo2d(window.gsImage);
var d = gsImage2d.data;
var outputImage = [];
var windowSize = parseInt($('#input-filtering-mediana-windowsize').val()) || 3;
var wh = windowSize;
@fend25
fend25 / hammingCode.cs
Created November 6, 2015 11:52
hamming code on C# (for 11 digits, 15 total)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace hammingCode
{
class Program
@fend25
fend25 / 1.js
Last active December 18, 2015 19:16 — forked from lega911/1.js
alight.filters.throttle = {
data: {
delay: 0,
to: null,
scope: null
}
init: function(delay, scope) {
data.delay = Number(delay);
data.to = null;
data.scope = scope;
@fend25
fend25 / index.html
Created January 25, 2016 10:34
alight router draft
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>alight router</title>
</head>
<body>
<div al-router-screen="auth">
<!-- common header -->
Online Builder, Basis and Full version
al-init $element
al-model - proxy for al-value, al-focused, al-checked ...
про эвенты и атрибуты - без компонентов
@event
@keydown.alt.control.shift.meta.enter
{
"presets": ["es2015-node6"],
"plugins": [
"transform-async-to-generator",
"syntax-async-functions"
],
"sourceMaps": "inline"
}
@fend25
fend25 / WebStorm.cmd
Created September 24, 2019 07:18 — forked from M1chaelTran/WebStorm.cmd
Add `Open with WebStorm` to Windows right click context menu
@echo off
:: change the path below to match your installed version
SET WebStormPath=C:\Program Files\JetBrains\WebStorm 2017.2.2\bin\webstorm64.exe
echo Adding file entries
@reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm" /t REG_SZ /v "" /d "Open with WebStorm" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm" /t REG_EXPAND_SZ /v "Icon" /d "%WebStormPath%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\WebStorm\command" /t REG_SZ /v "" /d "%WebStormPath% \"%%1\"" /f
@fend25
fend25 / TypedObjectMethods.ts
Created May 8, 2020 13:29
Typescript. Typed versions of Object.keys, Object.values, Object.entries
export const getKeys = <T extends Object>(o: T) => Object.keys(o) as Array<keyof T>
export const getValues = <T extends Object>(o: T) => Object.values(o) as Array<T[keyof T]>
export const getEntries = <T extends Object>(o: T) => Object.entries(o) as Array<[keyof T, T[keyof T]]>

How to use:

  1. Clone this repo: https://github.com/UniqueNetwork/unique-playgrounds and install deps
  2. Place this file to the playgrounds repo, folder src/playgrounds: src/playgrounds/sadu_mint.dev.js.
  3. Place env file to the playgrounds repo, folder src/playgrounds: src/playgrounds/__env.dev.js.
  4. Place folder with all 24 token JSONs to the folder data/sadu_token_jsons
  5. Check and change config - __env.dev.js. Especially the ceed.
  6. REALLY CAREFULLY check var ACCOUNT_TO_WHERE_TO_MINT in the main file - line 17.
  7. Check collection name and token prefix - remove ${rnd} and change token prefix to 'SADU'
  8. Try to run the script on the DEV Quartz (wss://ws-quartz-dev.comecord.com).