Skip to content

Instantly share code, notes, and snippets.

@asiellb
asiellb / setChromeOptions.js
Created November 16, 2022 02:44 — forked from anandsunderraman/setChromeOptions.js
Selenium Web Driver Set Chrome Options
//import the selenium web driver
var webdriver = require('selenium-webdriver');
var chromeCapabilities = webdriver.Capabilities.chrome();
//setting chrome options to start the browser fully maximized
var chromeOptions = {
'args': ['--test-type', '--start-maximized']
};
chromeCapabilities.set('chromeOptions', chromeOptions);
var driver = new webdriver.Builder().withCapabilities(chromeCapabilities).build();
@asiellb
asiellb / data.ndjson
Created July 10, 2022 18:44 — forked from bennadel/data.ndjson
Parsing And Serializing Large Datasets Using Newline-Delimited JSON In Node.js
{"id":1,"name":"O Brother, Where Art Thou?"}
{"id":2,"name":"Home for the Holidays"}
{"id":3,"name":"The Firm"}
{"id":4,"name":"Broadcast News"}
{"id":5,"name":"Raising Arizona"}
@asiellb
asiellb / mysql_query_log.md
Created May 4, 2022 02:53 — forked from joseluisq/mysql_query_log.md
How to enable the MySQL/MariaDB general query logs

How to enable the MySQL/MariaDB general query logs

  1. Enter to MySQL/MariaDB server command-line tool (change root with your username and password):
mysql -u root -proot
  1. Set the general log file path:
SET GLOBAL general_log_file='/var/log/mysql/mycustom.log';
@asiellb
asiellb / gist:f257a4572d10e0715dd0e0611e428048
Created December 17, 2021 14:13 — forked from jwebcat/gist:5122366
Properly download from github using wget and curl
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1
# --no-check-cerftificate was necessary for me to have wget not puke about https
curl -LJO https://github.com/joyent/node/tarball/v0.7.1
@asiellb
asiellb / mac-linux-nfs.md
Created November 16, 2021 13:51 — forked from betweenbrain/mac-linux-nfs.md
Mac backup to Linux NFS via Time Machine

Host

$ sudo apt update
$ sudo apt install nfs-kernel-server
$ sudo mkdir /mnt/nfs -p
$ sudo chown nobody:nogroup /mnt/nfs
$ sudo chmod 777 /mnt/nfs
$ sudo nano /etc/exports
  • add something like /mnt/nfs 192.168.1.101(rw,sync,no_root_check,no_subtree_check)
@asiellb
asiellb / gist:81da8cbc67a6f00ff17cf79d33dffc8c
Created September 6, 2021 16:24 — forked from willnss/gist:1878806
explained email regex
/\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i full regex
/ start of regex
\A atch start of a string
[\w+\-.]+ at least one word character, plus, hyphen, or dot
@ literal “at sign”
[a-z\d\-.]+ at least one letter, digit, hyphen, or dot
\. literal dot
[a-z]+ at least one letter
\z match end of a string
/ end of regex
@asiellb
asiellb / ocr.markdown
Created September 5, 2021 23:57 — forked from henrik/ocr.markdown
OCR on OS X with tesseract

Install ImageMagick for image conversion:

brew install imagemagick

Install tesseract for OCR:

brew install tesseract --all-languages

Or install without --all-languages and install them manually as needed.

@asiellb
asiellb / README.md
Created July 15, 2021 15:22 — forked from magnetikonline/README.md
Enable LDAP over SSL (LDAPS) for Microsoft Active Directory servers.

Enable LDAP over SSL (LDAPS) for Microsoft Active Directory servers

Microsoft active directory servers will default to offer LDAP connections over unencrypted connections (boo!).

The steps below will create a new self signed certificate appropriate for use with and thus enabling LDAPS for an AD server. Of course the "self-signed" portion of this guide can be swapped out with a real vendor purchased certificate if required.

Steps have been tested successfully with Windows Server 2012R2, but should work with Windows Server 2008 without modification. Requires a working OpenSSL install (ideally Linux/OSX) and (obviously) a Windows Active Directory server.

@asiellb
asiellb / nvmlink
Created April 7, 2021 05:05 — forked from MeLlamoPablo/nvmlink
Creates a symlink to /usr/bin/node after using nvm