Skip to content

Instantly share code, notes, and snippets.

View ktaranov's full-sized avatar
🎯
Focusing

Konstantin Taranov ktaranov

🎯
Focusing
View GitHub Profile
@ktaranov
ktaranov / 0_reuse_code.js
Created October 29, 2015 20:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ktaranov
ktaranov / PS_Script_Template_V2_Logs.ps1
Created August 1, 2017 09:44 — forked from 9to5IT/PS_Script_Template_V2_Logs.ps1
PowerShell: Script Template Version 2 (with logging)
#requires -version 4
<#
.SYNOPSIS
<Overview of script>
.DESCRIPTION
<Brief description of script>
.PARAMETER <Parameter_Name>
<Brief description of parameter input required. Repeat this attribute if required>
@ktaranov
ktaranov / PS_Script_Template_V2_NoLogs.ps1
Created August 1, 2017 09:45 — forked from 9to5IT/PS_Script_Template_V2_NoLogs.ps1
PowerShell: Script Template Version 2 (without logging)
#requires -version 4
<#
.SYNOPSIS
<Overview of script>
.DESCRIPTION
<Brief description of script>
.PARAMETER <Parameter_Name>
<Brief description of parameter input required. Repeat this attribute if required>
Sub PasswordBreaker()
'Breaks worksheet password protection.
Dim i As Integer, j As Integer, k As Integer
Dim l As Integer, m As Integer, n As Integer
Dim i1 As Integer, i2 As Integer, i3 As Integer
Dim i4 As Integer, i5 As Integer, i6 As Integer
On Error Resume Next
For i = 65 To 66: For j = 65 To 66: For k = 65 To 66
For l = 65 To 66: For m = 65 To 66: For i1 = 65 To 66
For i2 = 65 To 66: For i3 = 65 To 66: For i4 = 65 To 66
@ktaranov
ktaranov / app.R
Created October 17, 2017 07:35 — forked from gluc/app.R
Shiny CRUD
library(shiny)
library(shinyjs)
# Get table metadata. For now, just the fields
# Further development: also define field types
# and create inputs generically
GetTableMetadata <- function() {
fields <- c(id = "Id",
@ktaranov
ktaranov / README.rst
Created December 10, 2017 13:33 — forked from dupuy/README.rst
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@ktaranov
ktaranov / Util_CopyTable.SQL
Created December 15, 2017 12:23 — forked from MNF/Util_CopyTable.SQL
Copy table With Schema And Data
- --from http://dba.stackexchange.com/questions/18059/copy-complete-structure-of-a-table
IF TYPE_ID(N'TestTableType') IS NULL
create type TestTableType as table (ObjectID int)
go
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- Drop stored procedure if it already exists
@ktaranov
ktaranov / Finding undocumented trace flags.sql
Created January 11, 2018 13:28 — forked from BrentOzar/Finding undocumented trace flags.sql
Stored procedure that continuously restarts SQL Server looking for undocumented trace flags
/*
THIS IS A SPECTACULARLY BAD IDEA.
Never, ever, ever run this in production.
Don't even run it on a VM that you care about.
(I specifically build a throwaway VM just to run this.)
Get the latest version:
https://gist.github.com/BrentOzar/5d8e4e8cbc1d89d1021b6f889762d835
*/
@ktaranov
ktaranov / Dockerfile
Created February 6, 2018 15:05
Dockerfile for build image with Nemesida Scanner
Dockerfile
----------------------------------------------------------------------------------------------------------------------
FROM debian
RUN apt-get update &&\
apt-get upgrade -y &&\
apt-get dist-upgrade -y &&\
apt install wget -y &&\
apt-get update && apt-get install apt-transport-https -y &&\
echo "deb https://nemesida-security.com/ns/debian stretch non-free" > /etc/apt/sources.list.d/NemesidaScanner.list &&\
apt install gnupg -y &&\
@ktaranov
ktaranov / SpotifyWebScraper.Rmd
Created April 26, 2018 08:27 — forked from imjakedaniels/SpotifyWebScraper.Rmd
Building a Web scraper, rvest, purr, dplyr, and ggplot2
```{r}
#packages
library(rvest)
library(tidyverse)
library(magrittr)
library(scales)
library(knitr)
library(lubridate)
```