Skip to content

Instantly share code, notes, and snippets.

View otravers's full-sized avatar
💭
Always Be Charting

Olivier Travers otravers

💭
Always Be Charting
View GitHub Profile
@Krazybug
Krazybug / calishot-howto.md
Last active March 22, 2024 19:28
Calishot Howto

What is it ?

CALISHOT is a specialised search engine to unearth books on open calibre servers.

It allows you to search ebooks in full text across them or to browse the database by facets: authors, language, year, series, tags ... You can even run your own queries in SQL.

Where is this ?

These servers are often up and down so, for now, the data are regularly updated and new snasphots are posted on ...

@veltman
veltman / README.md
Last active April 19, 2023 16:32
Generating an SVG from a set of shapefiles

Generating an SVG from a set of shapefiles

The USGS provides detailed downloads of fire perimeters, with timestamped files that can be used to show the spread of a major fire over time.

Using the 2017 Thomas fire as an example, we'll process this data into a single SVG file with all the different perimeter measurements.

This index page contains links to a series of shapefiles of the fire boundary, each one with a timestamp:

https://rmgsc.cr.usgs.gov/outgoing/GeoMAC/2017_fire_data/California/Thomas/

[{"111110":"111120","Soybean Farming":"Oilseed (except Soybean) Farming"},
{"111110":"111130","Soybean Farming":"Dry Pea and Bean Farming"},
{"111110":"111140","Soybean Farming":"Wheat Farming"},
{"111110":"111150","Soybean Farming":"Corn Farming"},
{"111110":"111160","Soybean Farming":"Rice Farming"},
{"111110":"111191","Soybean Farming":"Oilseed and Grain Combination Farming"},
{"111110":"111199","Soybean Farming":"All Other Grain Farming"},
{"111110":"111211","Soybean Farming":"Potato Farming"},
{"111110":"111219","Soybean Farming":"Other Vegetable (except Potato) and Melon Farming"},
{"111110":"111310","Soybean Farming":"Orange Groves"},
@tonmcg
tonmcg / UseJavaScript
Created May 24, 2018 00:55
M Language XHR Functions
let
javascriptDates = Web.Page("
<script type='text/javascript'>
function wait(ms){
var start = new Date().getTime();
var end = start;
while(end < start + ms) {
end = new Date().getTime();
}
}
@MarkTiedemann
MarkTiedemann / power-query-pagination.m
Last active March 5, 2024 23:43
Power Query Pagination Example
let
BaseUrl = "https://fake-odata-api.com/v1/Entities?",
Token = "F4K3-T0K3N-D0NT-U5E-L0L",
EntitiesPerPage = 1000,
GetJson = (Url) =>
let Options = [Headers=[ #"Authorization" = "Bearer " & Token ]],
RawData = Web.Contents(Url, Options),
Json = Json.Document(RawData)
in Json,
@ap0llo
ap0llo / Export-Chart.ps1
Created January 15, 2017 19:08
Powershell script to export charts from excel to jpg
# Powershell script to export charts from excel to jpg
function Export-Chart($inputFile, $sheetName, $chartIndex, $outputFile)
{
# Load Powerpoint Interop Assembly
[Reflection.Assembly]::LoadWithPartialname("Microsoft.Office.Interop.Excel") > $null
[Reflection.Assembly]::LoadWithPartialname("Office") > $null
$msoFalse = [Microsoft.Office.Core.MsoTristate]::msoFalse
$msoTrue = [Microsoft.Office.Core.MsoTristate]::msoTrue
@prestontighe
prestontighe / Dockerfile
Last active July 11, 2017 18:16
XDebug Docker Issue. The Dockerfile is used in the `toozick/smu-arcade-machine-management-console-php-apache:v1` image. Everything with our setup works except XDebug. What could the problem be?
# FROM debian:jessie
FROM php:5.6-apache
MAINTAINER Preston Tighe
## Install
RUN apt-get update
# Apache server name
RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf
@jehaby
jehaby / README.md
Last active January 25, 2024 14:43 — forked from chadrien/README.md
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
    && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
@Mike-Honey
Mike-Honey / ExpandAllRecords.M
Created March 22, 2016 21:50
ExpandAllRecords function for Power Query or Power BI - expands all record-type columns recursively
// Based on Chris Webb's blog post - http://blog.crossjoin.co.uk/2014/05/21/expanding-all-columns-in-a-table-in-power-query/
let
//Define function taking two parameters - a table and an optional column number
Source = (TableToExpand as table, optional ColumnNumber as number) =>
let
//If the column number is missing, make it 0
ActualColumnNumber = if (ColumnNumber=null) then 0 else ColumnNumber,
//Find the column name relating to the column number
ColumnName = Table.ColumnNames(TableToExpand){ActualColumnNumber},
@chadrien
chadrien / README.md
Last active September 1, 2023 12:43
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
&amp;&amp; echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" &gt; /usr/local/etc/php/conf.d/xdebug.ini \