Skip to content

Instantly share code, notes, and snippets.

View netlooker's full-sized avatar
💻
Vibe Coding 💯

NetLooker netlooker

💻
Vibe Coding 💯
View GitHub Profile
<?php
declare(strict_types=1);
namespace Cocoders\core\Application\UseCase;
use Cocoders\Core\Domain\Users;
use Cocoders\Core\Application\TransactionManager;
use Cocoders\core\Application\UseCase\RegisterUser\UserFactory;
use Cocoders\core\Application\UseCase\RegisterUser\Command;
@netlooker
netlooker / pagination.html.twig
Created March 26, 2018 14:20 — forked from SimonSimCity/pagination.html.twig
A gist for pagination in Twig, based on the total number of pages, the current page and some URL-settings.
{#
Source: http://dev.dbl-a.com/symfony-2-0/symfony2-and-twig-pagination/
Updated by: Simon Schick <[email protected]>
Parameters:
* currentFilters (array) : associative array that contains the current route-arguments
* currentPage (int) : the current page you are in
* paginationPath (string) : the route name to use for links
* showAlwaysFirstAndLast (bool) : Always show first and last link (just disabled)
* lastPage (int) : represents the total number of existing pages
@netlooker
netlooker / build.properties
Created July 18, 2017 10:38 — forked from bastman/build.properties
phing example tasks
project.environment.name=local
project.name=${phing.project.name}
dir.build_xml=${project.basedir}
project.host.default=${project.environment.name}.${project.name}.mydomain.com
dir.project=${dir.build_xml}/../../..
@netlooker
netlooker / README.md
Created June 16, 2017 22:44 — forked from gdamjan/README.md
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all. The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.

What

A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.

Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).

Requirements

#!/usr/bin/env node
'use strict';
"use latest";
var https = require('https');
var cheerio = require('cheerio');
var base = 'https://www.packtpub.com/'
var freeEbookURL = base + 'packt/offers/free-learning';
@netlooker
netlooker / 0_reuse_code.js
Last active August 29, 2015 14:11
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