Skip to content

Instantly share code, notes, and snippets.

View ilyaevseev's full-sized avatar

Ilya Evseev ilyaevseev

  • Loyaltyplant.com
  • Nazareth, Israel
  • 22:02 (UTC +03:00)
  • LinkedIn in/ilyaevseev
View GitHub Profile
@krmaxwell
krmaxwell / notes.md
Last active August 31, 2016 11:51
Installing jekyll fresh on Ubuntu 14.04.1 LTS
@skaurus
skaurus / anyevent-proxy.pl
Created September 8, 2011 09:30
AnyEvent HTTP Proxy
#!/usr/bin/perl
# This is HTTP proxy built atop AnyEvent::HTTPD and AnyEvent::HTTP modules.
# I used it to solve some problem but after testing realised that it doesn't solve it entirely.
# So I removed special logic and leave almost plain proxy. With referer forging however :)
#
# Test thoroughly before use!
use strict;
use warnings;
@dadoonet
dadoonet / backup.sh
Created December 26, 2012 14:50
Backup Elasticsearch node
# Script to be placed in elasticsearch/bin
# Launch it from elasticsearch dir
# bin/backup indexname
# We suppose that data are under elasticsearch/data
# It will create a backup file under elasticsearch/backup
if [ -z "$1" ]; then
INDEX_NAME="dummy"
else
INDEX_NAME=$1
@pragmaticivan
pragmaticivan / install-chrome-headless.sh
Created February 1, 2018 22:24 — forked from ipepe/install-chrome-headless.sh
Installing headless chrome on Ubuntu.
#!/bin/bash
# from https://chromium.woolyss.com/
# and https://gist.github.com/addyosmani/5336747
# and https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:canonical-chromium-builds/stage
sudo apt-get update
sudo apt-get install chromium-browser
chromium-browser --headless --no-sandbox http://example.org/
@amoilanen
amoilanen / webcrawler.js
Last active March 24, 2022 03:14
Simple PhantomJS-based web crawler library
//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov anton.al.ivanov@gmail.com 2012
//UPDATE: This gist has been made into a Node.js module and now can be installed with "npm install js-crawler"
//the Node.js version does not use Phantom.JS, but the API available to the client is similar to the present gist
(function(host) {
function Crawler() {
this.visitedURLs = {};
};
@pviojo
pviojo / <domain>.conf
Created June 14, 2012 00:04
Nginx conf. Wordpress blog in a subdirectory (/blog)
server {
listen 80;
server_name <domain>
server_name_in_redirect off;
access_log logs/<domain>.access.log;
error_log logs/<domain>.error.log;
gzip_static on;
network:
version: 2
renderer: networkd
bridges:
dummy0:
dhcp4: no
dhcp6: no
accept-ra: no
interfaces: [ ]
addresses:
@maxivak
maxivak / readme.md
Last active April 11, 2023 15:08
Restore repo from Gitlab bundle file

Gitlab exports repositories to tar archive which contains .bundle files.

We have repo.bundle file and we want to restore files from it.

  • create bare repo from bundle file
git clone --mirror myrepo.bundle my.git
@eatnumber1
eatnumber1 / renameat2.c
Last active November 3, 2023 17:24
Command-line tool to call renameat2(2)
/*
* Copyright (c) 2023 Russell Harmon
*
* 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:
*
@adrianbartyczak
adrianbartyczak / aws-signature-creator.sh
Created October 24, 2019 01:54
A signature creator for AWS signature version 4
#!/usr/bin/env bash
#
# File:
# aws-signature-creator.sh
#
# Description:
# A signature creator for AWS signature version 4
#
# References:
# https://czak.pl/2015/09/15/s3-rest-api-with-curl.html