Skip to content

Instantly share code, notes, and snippets.

View mungurs's full-sized avatar

Mārtiņš Ungurs mungurs

  • Latvia
View GitHub Profile
@mungurs
mungurs / xdebug.md
Created July 7, 2017 06:53 — forked from ankurk91/xdebug-mac.md
php xDebug on Ubuntu and phpStorm 2016

🪲 Install and Configure xDebug on Ubuntu and Php Storm 🐘

  • Assuming that you have already installed php and apache
  • Install xDebug php extension
# Ubuntu 16.04, php 7.0
sudo apt-get install php-xdebug

# Ubuntu 14.04, php 5.6 
sudo apt-get install php5-xdebug
@mungurs
mungurs / SassMeister-input.scss
Last active October 13, 2017 07:25
Generated by SassMeister.com.
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
@mungurs
mungurs / binarlauks.html
Created January 31, 2018 09:06 — forked from laacz/binarlauks.html
HTML koda sagatave, kura pasargā visus no binārlauka negatīvās enerģijas nelabvēlīgās ietekmes.
<!doctype html>
<head>
<!--
Šis pasargā no binārlauka negatīvās enerģijas nelabvēlīgās ietekmes.
Sīkāk: https://www.facebook.com/CUBESystems/videos/vb.158748300855954/1694637707266998/?type=2&theater
&
@@@@
@@@@
% @@@@
@mungurs
mungurs / ex.js
Created October 9, 2018 06:56 — forked from ritch/ex.js
What is the best way to document complex / dynamic objects as arguments to a function?
/**
* Below are several examples of methods that are difficult to clearly annotate with JSDoc annotations.
*/
/**
* @param {Object} people An index of people keyed by a person's name
* @returns {Object} map An index of zipcodes keyed by a person's name
*/
function find(people) {
@mungurs
mungurs / instructions.md
Created October 2, 2020 21:18 — forked from andrewn/instructions.md
Testing SSL (LetsEncrypt certificate and loopback domain)

Testing SSL (LetsEncrypt certificate and loopback domain)

General approach

This sets up a publically-available domain that loops back to localhost IP address 127.0.0.1. For example, this address could be localhost.example.com if we controlled the example.com domain. This relies on having a public domain name whose DNS records you can control. We can then generate LetsEncrypt certificates for this domain.

Our HTTP server runs on localhost:80 (default HTTP port). This lets us visit http://localhost.example.com in a web browser and see the server running on localhost:80.

We then run an HTTPS proxy server on localhost:443 (default HTTPS port) that uses the LetsEncrypt certificates we generated for localhost.example.com. Visiting https://localhost.example.com hits the proxy, which returns the correct certificates meaning the browser displays the "Secure" message. The proxy then passes the request through to the HTTP server.

@mungurs
mungurs / EloquentCheatSheet.md
Created April 15, 2022 15:19 — forked from avataru/EloquentCheatSheet.md
Eloquent relationships cheat sheet