Skip to content

Instantly share code, notes, and snippets.

View Lukas238's full-sized avatar
🏠
Working from home

Lucas Dasso Lukas238

🏠
Working from home
View GitHub Profile
@Lukas238
Lukas238 / .htpasswd_for_non_localhost.md
Last active February 19, 2019 17:32
Web security on Apache with .htpasswd for non localhost access

Web security on Apache with .htpasswd for non localhost access

Use this example to secure access to a website, but allowing at the same time unrestricted access on localhost, for easy development.

This is intended to be used on Apache web server 2.4+.

  1. Create the .htpasswd fie on your site root folder.
  2. Edit the file and add as many user:password pairs as you want.
@Lukas238
Lukas238 / MM_styles_patch.user.js
Last active January 10, 2019 14:54
Million Miler - Styles patch
// ==UserScript==
// @name Million Miler - Styles patch
// @namespace https://gist.github.com/Lukas238/cc6332691de104b115ae35cde9b4db2d
// @version 0.1
// @author Lucas Dasso http://www.c238.com.ar/
// @updateURL https://gist.githubusercontent.com/Lukas238/cc6332691de104b115ae35cde9b4db2d/raw/MM_styles_patch.user.js
// @downloadURL https://gist.githubusercontent.com/Lukas238/cc6332691de104b115ae35cde9b4db2d/raw/MM_styles_patch.user.js
// @match *thanksamillion.united.com/admin/productManage*
// @grant GM_addStyle
// ==/UserScript==
@Lukas238
Lukas238 / Search a string in files in repo history.md
Last active August 15, 2018 20:51
Search a string in files in repo history

Search a string in files in repo history

In case you need to check if some string existed on a old version of a file in your repository history, Git provide this command:

$ git log -S'text to search' --oneline --name-status

In case you have this error message:

@Lukas238
Lukas238 / site_download_with_wget.md
Last active July 5, 2018 18:10
Download a site as a static site using WGET

Download a site as a static site using WGET

$ wget -mnH -k --html-extension [SITE URL HERE]

This will download all the files in to the current folder.

Comments

@Lukas238
Lukas238 / cloudSettings
Last active March 25, 2021 15:35
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-03-25T15:35:00.799Z","extensionVersion":"v3.4.3"}
@Lukas238
Lukas238 / cloudSettings
Last active July 4, 2018 13:25
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-07-04T13:25:24.559Z","extensionVersion":"v2.9.2"}
@Lukas238
Lukas238 / CludflareDNS.md
Created June 10, 2018 14:41
CloudFlare DNS

Cludflare DNS

Protocol DNS1 DNS2
IP4 1.1.1.1 1.0.0.1
IP6 2606:4700:4700::1111 2606:4700:4700::1001
// ==UserScript==
// @name Responsys - Linktable editor
// @namespace http://tampermonkey.net/
// @version 0.0.3
// @description Improves the default GUI of Responsys Linktable editor view.
// @author Lucas Dasso http://www.c238.com.ar/
// @updateURL https://gist.github.com/Lukas238/de789a1efe03c43ed8e47a4b58cc8b2a/raw/Responsys_Linktable_editor.user.js
// @downloadURL https://gist.github.com/Lukas238/de789a1efe03c43ed8e47a4b58cc8b2a/raw/Responsys_Linktable_editor.user.js
// @match https://interact2.responsys.net/interact/jsp/en/lists/DataViewerEditRow.jsp*
// @grant GM_addStyle
@Lukas238
Lukas238 / xampp_ssl_setup.md
Last active March 12, 2018 19:48
XAMPP - SSL certificate error

XAMPP - CURL SSL Setup

To fix the SSL certificate error message "SSL certificate error: unable to get local issuer certificate" try this:

  • Download the cert to the PHP instalation folder.
    • Manualy:
    • With wget: wget http://curl.haxx.se/ca/cacert.pem -P C:\xampp\php\extras\ssl\
  • Open c:\xampp\php\php.ini with Notepad++
@Lukas238
Lukas238 / wsl_kali_RDP.md
Created March 7, 2018 02:03
Windows 10 WSL Kali remote desktop protocol

Remote Desktop for Kali Linux under Windows 10 WSL

  1. Install Kali linus from the Win10 store.
  2. Start Kali linux: $ kali
  3. Install [wget]: apt-get install wget
  4. Donwload the Kali installation script for [xfce4]: $ wget https://kali.shxfce4.sh
  5. Run the script: $ sudo sh xfce4.sh

This will take some time.

  1. Start the remote desktop server: $ sudo /etc/init.d/xrdp start

By default it will start on port 3390.