Skip to content

Instantly share code, notes, and snippets.

@peterhurford
peterhurford / install_xelatex_on_mac.txt
Last active April 16, 2024 04:20
How to install latex and xelatex on Mac so that Jupyter "Download as PDF" will work
brew install pandoc
brew tap homebrew/cask
brew install --cask basictex
eval "$(/usr/libexec/path_helper)"
# Update $PATH to include `/usr/local/texlive/2022basic/bin/universal-darwin`
sudo tlmgr update --self
sudo tlmgr install texliveonfly
sudo tlmgr install xelatex
sudo tlmgr install adjustbox
sudo tlmgr install tcolorbox
@keeth
keeth / api.tf
Last active January 13, 2021 14:34
Apex + Terraform + AWS Lambda + API Gateway + JSON Encoded Errors + CORS
resource "aws_api_gateway_rest_api" "myApi" {
name = "myApi-${var.env}"
description = "My awesome API (${var.env} environment)"
}
resource "aws_api_gateway_deployment" "myApi" {
depends_on = [
"aws_api_gateway_integration.myApi_myEndpoint_post",
"aws_api_gateway_integration_response.myApi_myEndpoint_post",
"aws_api_gateway_integration_response.myApi_myEndpoint_post_400",
@heapwolf
heapwolf / iccat.sh
Last active March 8, 2017 16:06
Download and show image in terminal (iterm2 only)
#!/bin/bash
function print_image() {
printf "\033]"
printf "1337;File="
echo -n "$1" | base64 -D | wc -c | awk '{printf "size=%d",$1}'
printf ";inline=1:"
echo -n "$1"
printf "\a\n"
}
@ethicka
ethicka / localhost-ssl.md
Last active April 12, 2024 12:26 — forked from jonathantneal/README.md
Local virtualhost SSL websites on Mac OS Sierra

Local virtualhost SSL websites on Mac OS Sierra

These instructions will guide you through the process of setting up a wildcard SSL for your local virtualhosts for offline development. Most importantly, this configuration will give you the happy, green lock in Chrome.

These instructions have only been tested on Mac OS Sierra using the pre-installed Apache and PHP versions. These instructions also assume you have virtualhosts set up locally already.


Configuring SSL

@Remiii
Remiii / AssetsUpdateHeadersCommand.php
Last active September 18, 2015 08:32
Update headers assets on S3 (CloudFront)
<?php
// src/remiii/UtilsBundle/Command/Assets/AssetsUpdateHeadersCommand.php
namespace remiii\UtilsBundle\Command\Assets ;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand ;
use Symfony\Component\Console\Input\InputArgument ;
use Symfony\Component\Console\Input\InputInterface ;
use Symfony\Component\Console\Input\InputOption ;
@Remiii
Remiii / README.md
Last active August 28, 2015 13:59
Hubot MamaCake (Paris 18e)
<?php
namespace remiii\UtilsBundle\Command\Assets ;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand ;
use Symfony\Component\Console\Input\InputArgument ;
use Symfony\Component\Console\Input\InputInterface ;
use Symfony\Component\Console\Input\InputOption ;
use Symfony\Component\Console\Output\OutputInterface ;
@cheeaun
cheeaun / bus-stops.geojson
Created April 29, 2015 06:21
A more accurate list of bus stops in Singapore
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Remiii
Remiii / README.md
Last active June 1, 2018 05:31
GitHub production pull (machine users)

GitHub production pull (machine users)

This README give steps in order to use GitHub machine users... 😎 In case of a first GitHub setup please refer to GitHub set up article.

/home/myuser/.ssh/
    |
    +-- config
    |
 +-- myusermachinekey
@Remiii
Remiii / README.md
Last active August 29, 2015 14:03
Git Noob

Git Noob

Yo les Noobs, c'est ici que cela se passe ! 👊

Configuring a remote for a fork and Syncing a fork

$ git remote add user git@github.com:user/repo.git
$ git fetch user
$ git checkout -b user-branchName remotes/user/repo