Skip to content

Instantly share code, notes, and snippets.

Avatar

Valentin Semirulnik 7rulnik

View GitHub Profile
View get-npm-dependents.js
async function getAllDependents(packageName) {
const packages = []
let offset = 0
let json
do {
const response = await fetch(`https://www.npmjs.com/browse/depended/${packageName}?offset=${offset}`, {
"headers": {
"x-spiferack": "1"
},
View keybase.md

Keybase proof

I hereby claim:

  • I am 7rulnik on github.
  • I am 7rulnik (https://keybase.io/7rulnik) on keybase.
  • I have a public key whose fingerprint is 5D2B AAE7 4D95 DB34 7384 16B5 8B48 C41D 6518 A013

To claim this, I am signing this object:

View get-ps4-games.js
// works only for russian language but you can change arguments in meta.includes
// Open https://store.playstation.com/ru-ru/download/list and run script below
let games = [];
while (
!document
.querySelector('.paginator-control__page-number--selected')
.nextElementSibling.classList.contains('paginator-control__arrow-navigation')
@7rulnik
7rulnik / checkpoint.sh
Created May 4, 2020 — forked from phoob/checkpoint.sh
The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just from time to time.
View checkpoint.sh
#!/bin/bash
#
# The reason of creating this script is that Endpoint Security VPN installs it's own application firewall kext cpfw.kext
# which prevents for example PPTP connections from this computer, which is not appropriate if you need subj connection just
# from time to time
#
# Usage: ./checkpoint.sh
#
# The script checks if Enpoint Security VPN is running. If it is, then it shuts it down, if it is not, it fires it up.
# Or, make an Automator action and paste the script.
View automerge.py
# (c) 2020 Humu
# MIT License
from typing import Any
import github
AUTOMERGE_LABEL_NAME = 'automerge'
View tinkoff-all-airlines-comprasion.js
const fs = require('fs')
const papaparse = require('papaparse')
// нужно вырезать строку с названием стоблцов
const csv = fs.readFileSync('./2018.csv', 'utf8')
const { data } = papaparse.parse(csv)
const realCashback = data.reduce((acc, item) => {
View lint-changed.js
const childProcess = require('child_process')
const type = process.argv[2]
const currentBranch = 'git branch'
const diff = 'git diff --name-only --diff-filter=ACMTUXB origin/develop...HEAD'
const filter = `${diff} | grep app/.*\\.${type === 'css' ? 'sss$' : 'js$ | grep -v json'}`
const lint = type === 'css' ? 'stylelint $LIST --syntax sugarss' : 'eslint $LIST'
const condition = `if [ "$LIST" ]; then ./node_modules/.bin/${lint}; fi`
@7rulnik
7rulnik / .block
Last active Jan 23, 2018 — forked from kerryrodden/.block
Sequences sunburst (d3 v4)
View .block
license: apache-2.0
@7rulnik
7rulnik / .block
Created Jan 23, 2018 — forked from kerryrodden/.block
Sequences sunburst (d3 v4)
View .block
license: apache-2.0
@7rulnik
7rulnik / types.txt
Created Jan 3, 2017 — forked from manuelgu/types.txt
Valid action types for the Trello API
View types.txt
CREATE_CARD = "createCard";
COMMENT_CARD = "commentCard";
UPDATE_CARD = "updateCard";
UPDATE_CARD_ID_LIST = "updateCard:idList";
UPDATE_CARD_CLOSED = "updateCard:closed";
UPDATE_CARD_DESC = "updateCard:desc";
UPDATE_CARD_NAME = "updateCard:name";
ADD_MEMBER_TO_CARD = "addMemberToCard";
REMOVE_MEMBER_FROM_CARD = "removeMemberFromCard";
UPDATE_CHECK_ITEM = "updateCheckItemStateOnCard";