Skip to content

Instantly share code, notes, and snippets.

View valerysntx's full-sized avatar
🔋
99%

valery sntx valerysntx

🔋
99%
  • Ukraine, Uzhgorod
View GitHub Profile
@valerysntx
valerysntx / index.html
Created August 27, 2019 13:48
Ember Starter Kit [deprecated enber 1.12.2 bind-action example] // source https://jsbin.com/teciyag
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[deprecated enber 1.12.2 bind-action example]">
<meta charset="utf-8">
<title>Ember Starter Kit</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css">
<script src="https://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.12.2/ember.debug.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ember.js/1.12.2/ember-template-compiler.js"></script>
@valerysntx
valerysntx / hikvision-password-recovery.js
Created April 2, 2019 15:34
hikvision-password-reset-tool
function padLeft(str, l, c) { str = str + ""; return Array(l - str.length + 1).join(c || " ") + str }
function initialize()
{
document.getElementById("year").value = new Date().getYear() + 1900;
document.getElementById("month").value = padLeft(new Date().getMonth() + 1, 2, '0');
document.getElementById("day").value = padLeft(new Date().getDate(), 2, '0');
document.getElementById("serialNumber").onchange = GenerateSerialCode;
document.getElementById("year").onchange = GenerateSerialCode;
@valerysntx
valerysntx / knockout-react.js
Created February 3, 2019 23:23
knockout-react.js
var KnockoutMixin = {
updateKnockout() {
// This has been bound to the dependancy chain in __koModel,
// found in the componentDidMount lifecycle stage. Changing this
// observable will cause __koModel to revaluate it's values.
this.__koTrigger(!this.__koTrigger());
},
componentDidMount() {
this.__koTrigger = ko.observable(true);
this.__koModel = ko.computed(function () {
@valerysntx
valerysntx / Unregister-MissingMSIs.ps1
Last active December 21, 2018 22:44 — forked from heaths/Unregister-MissingMSIs.ps1
Removes Windows Installer product registration for products where the locally cached MSI is missing and no registered source can be found.
#Requires -Version 3
# The MIT License (MIT)
# Copyright (C) Microsoft Corporation. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
@valerysntx
valerysntx / S7272XXUAND2_v2.3.zip
Created December 16, 2018 18:27
S7272XXUAND2_v2.3.zip
https://drive.google.com/file/d/0B6RDfwXFqsr8OEh5OEMtMHZzOGM/view?usp=sharing
@valerysntx
valerysntx / scanindirectdependencies.target
Created December 16, 2018 15:35
Scan Indirect Project Dependencies Recursively
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- All the stuff normally found in the project, then in the AfterBuild event... -->
<Target Name="AfterBuild">
<!-- Here's the call to the custom task to get the list of dependencies -->
<ScanIndirectDependencies StartFolder="$(MSBuildProjectDirectory)"
StartProjectReferences="@(ProjectReference)"
Configuration="$(Configuration)">
<Output TaskParameter="IndirectDependencies" ItemName="IndirectDependenciesToCopy" />
</ScanIndirectDependencies>
@valerysntx
valerysntx / ObjectActivatorEx.cs
Created December 4, 2018 19:22
ActivatorEx IL
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.33440
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// Metadata version: v4.0.30319
@valerysntx
valerysntx / DCGAN.ipynb
Created November 10, 2018 23:25 — forked from awjuliani/DCGAN.ipynb
An implementation of DCGAN in Tensorflow and Python.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@valerysntx
valerysntx / get-docker.sh
Created November 3, 2018 14:58
get-docker.sh
#!/bin/sh
set -e
# This script is meant for quick & easy install via:
# $ curl -fsSL get.docker.com -o get-docker.sh
# $ sh get-docker.sh
#
# For test builds (ie. release candidates):
# $ curl -fsSL test.docker.com -o test-docker.sh
# $ sh test-docker.sh
@valerysntx
valerysntx / Measure-TargetFramework.ps1
Created October 21, 2018 19:19
Measure-TargetFramework powershell msbuild inline task helper
Get-ChildItem -Path C:\path\to\project\root -Filter *.csproj -Recurse |
Select-Xml -Namespace @{msb="http://schemas.microsoft.com/developer/msbuild/2003"} -XPath "//msb:TargetFrameworkVersion" |
Select-Object -Property @{Name="TargetFrameworkVersion"; Expression={$_.Node.InnerXml}} |
Select-Object -ExpandProperty TargetFrameworkVersion |
Group-Object