Skip to content

Instantly share code, notes, and snippets.

View nergal's full-sized avatar
🇺🇦
Ще не вмерла України i слава і воля

Artem Poliukhovych nergal

🇺🇦
Ще не вмерла України i слава і воля
  • SoftServe Inc
  • Kyiv, Ukraine
  • 01:54 (UTC +03:00)
View GitHub Profile
@nergal
nergal / numfmt.d.ts
Created December 13, 2023 14:34
@types/numfmt - numfmt package typescript definitions
declare module 'numfmt' {
type LocaleTag = string;
type LocaleData = {
group: string;
decimal: string;
positive: string;
negative: string;
percent: string;
exponent: string;
nan: string;
from flask import Flask, escape, request, jsonify
from flask_cors import CORS, cross_origin
from urllib import parse
from functools import lru_cache
import requests
app = Flask(__name__)
cors = CORS(app)
JIRA_HOST = "xxx"
class SomeComponent {
public interactionsPublic$: Observable<Interaction[]>;
private interactions$: Observable<Interaction[]>;
public filterField: 'isAccepted' | 'isPending' | 'isRejected';
protected defaultFilter = 'isAccepted';
public filterSubject: BehaviorSubject<string[]> = new BehaviorSubject([]);
constructor(
@nergal
nergal / wallaby.conf.js
Last active August 28, 2019 14:33
Wallaby configuration for Angular 5 (created from @angular/cli)
var wallabyWebpack = require('wallaby-webpack');
var webpackPostprocessor = wallabyWebpack({
entryPatterns: [
'wallaby.spec-bundle.js',
'src/**/*spec.js'
],
module: {
loaders: [
import java.net.{URLConnection,URL}
import scala.xml._
import scala.collection.mutable.Buffer
case class Feed(val url: String) {
var buff: Elem = {
val u = new URL(this.url)
val conn = u.openConnection()
conn.connect
@nergal
nergal / vk_api.php
Created October 19, 2011 13:11
Vkontakte API undocumented restricted access
<?php
function request($url, Array $params = array()) {
array_walk($params, function($item, $key) use ( & $url) {
$url = str_replace('{'.$key.'}', $item, $url);
});
$curl = curl_init();
$options = array(
CURLOPT_URL => $url,
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os.path
from re import compile
from threading import Thread
class Worker(Thread):
def __init__(self, folder=".", verbose=True):
<?php
/**
* Аплоад файла с расширенной проверкой типа
*
* @throws Zend_File_Transfer_Exception
* @param string $filename
* @param array $allowed_types
* @return string
*/
<?php
/**
* Событийный класс
*
* @package Fan
* @class Fan_Event
* @author Nergal
*/
class Fan_Event