Skip to content

Instantly share code, notes, and snippets.

@kimlombard
kimlombard / index.php
Created April 5, 2019 19:05
[CORS] Dealing with CORS issues by sending the appropriate headers #php
<?php
require 'vendor/autoload.php';
Flight::route('/', function(){
echo 'hello world!';
});
Flight::route('/cors', function(){
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
1. Export "Main Pricelist" sheet as CSV.
2. Cleanup the CSV file:
2.1. Run macro to extract URLs from hyperlinks.
2.2. Cut the extracted URLs and paste into the "Product URLs" column
2.3. Use Search & Replace regex to convert \n to ' ':
```
Find: \n
Replace: _ // As in ' ' or a single press of the spacebar
```
@kimlombard
kimlombard / Extract URLs from Hyperlinks
Last active November 26, 2018 13:08
LibreOffice Macros
@kimlombard
kimlombard / HTML Skeleton
Last active October 3, 2018 16:52
#html #skeleton
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,inital-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title></title>
</head>
<body>
@kimlombard
kimlombard / 0_reuse_code.js
Created April 13, 2016 01: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