Skip to content

Instantly share code, notes, and snippets.

View rolandinsh's full-sized avatar
🧔
Remote developer (LEMP, Node.js, Neo4j [graph])

Rolands rolandinsh

🧔
Remote developer (LEMP, Node.js, Neo4j [graph])
View GitHub Profile
@AntonFriberg
AntonFriberg / Dockerfile
Last active July 10, 2023 08:50
Simple docker cron sidecar container based on alpine image
FROM alpine:3.8
# Alpine comes with built in cron schedules
# min hour day month weekday command
# */15 * * * * run-parts /etc/periodic/15min
# 0 * * * * run-parts /etc/periodic/hourly
# 0 2 * * * run-parts /etc/periodic/daily
# 0 3 * * 6 run-parts /etc/periodic/weekly
# 0 5 1 * * run-parts /etc/periodic/monthly
@atefBB
atefBB / PHP-CURL-Tor-Tutorial.md
Last active February 11, 2022 02:07 — forked from megaxorg/PHP-CURL-Tor-Tutorial.md
PHP: CURL Requests with Tor

CURL Connections with Tor

Install Apache, PHP, CURL & Tor with apt-get

sudo apt-get install -y apache2 php5 php5-curl tor

Tor creates a proxy on your mashine with port 9050 for SOCKS5 connections.

@shivergard
shivergard / api.md
Last active February 26, 2018 21:45
API for Mobile Web apps

#exFoodyCheck API Documentation (for demo access and stuff please write some comment ;) )

Get Barcode Info

Returns json data about a single product.

  • URL

    /api/v1/get_barcode_info

@andyshinn
andyshinn / Dockerfile
Last active August 8, 2023 08:39
Postal on Docker
FROM ruby:2.3-onbuild
VOLUME /opt/postal/config
ENV LOG_TO_STDOUT 1
ENV AM_CONFIG_ROOT /opt/postal/config
RUN gem install procodile
RUN apt-get update -qq && apt-get install -yqq nodejs
@mlocati
mlocati / exceptions-tree.php
Created March 9, 2017 10:58
Throwable and Exceptions tree
<?php
if (!function_exists('interface_exists')) {
die('PHP version too old');
}
$throwables = listThrowableClasses();
$throwablesPerParent = splitInParents($throwables);
printTree($throwablesPerParent);
if (count($throwablesPerParent) !== 0) {
die('ERROR!!!');
@nerdfiles
nerdfiles / csrfCapture.js
Last active December 4, 2018 07:47
Replay a CSRF Token with request and cheerio (like if they're using session tokens on a webpage, sometimes they use JWT as CSRF tokens)
/* @fileOverview ./csrfCapture.js
* @description
* 1. Open Terminal
* 2. $ npm i request cheerio
*/
var request = require('request');
var cheerio = require('cheerio');
var someUrl = "https://microsoft.com/webpage";
@blackhalt
blackhalt / opaaa.txt
Created December 3, 2016 18:33
Sandras Veinbergas Olugalvas 2016-12-03
@Ucibucis
@MikelisM
@baldone1000
@karlissilins
@Tornitis7
@Zile999
@MaraVilde
@IlvaKrampuza
@aaralds
@oposums
@lightonphiri
lightonphiri / bash-install_google_fonts_on_ubuntu.md
Last active May 3, 2024 10:44
Install Google Fonts on Ubuntu

Install Google Fonts

Download desired fonts

https://fonts.google.com/?selection.family=Open+Sans

Install Google Fonts on Ubuntu

cd /usr/share/fonts
sudo mkdir googlefonts
cd googlefonts
sudo unzip -d . ~/Downloads/Open_Sans.zip

@jruts
jruts / neo4j_delete_duplicate_nodes.md
Last active September 28, 2023 14:22
How to delete duplicate nodes and their relationships in neo4j with cypher?

How to delete duplicate nodes and their relationships in neo4j with cypher based on a property of that node?

The problem is easy to understand. We have 'duplicate' nodes in our database based on the 'id' field on the node properties.

Well this sounds easy enough, until you have to actually do it.

First step

My first attempt was to try and figure out which nodes are actualy duplicate (based on a property on the node). This seems to be pretty straightforward.

Cypher:

@julienbourdeau
julienbourdeau / prestashop.conf
Created May 4, 2016 14:23
PrestaShop Nginx Configuration
server {
listen 80;
listen [::]:80; #Use this to enable IPv6
server_name www.example.com;
root /var/www/prestashop17;
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
index index.php index.html;