Skip to content

Instantly share code, notes, and snippets.

View webbedfeet's full-sized avatar

Abhijit Dasgupta webbedfeet

View GitHub Profile
@oleksis
oleksis / Git-push-error-HTTP-400.md
Created March 7, 2024 11:15
Git push error: HTTP 400

The error you're encountering is often due to issues with the HTTP version or the size of the data being pushed. Here are a few potential solutions:

  1. Switch to HTTP/1.1: The error message points to an issue with HTTP/2. You can force Git to use HTTP/1.1 with the following command¹:
git config --global http.version HTTP/1.1
  1. Increase the post buffer size: If you're pushing data larger than the postBuffer size, you may encounter this error. Increase the post buffer size with the following command¹³⁴:
@Aetherinox
Aetherinox / blue_topaz_overrides.css
Last active September 16, 2024 00:25
Obsidian: CSS Override
/* @settings
name: ⚙️ Blue Topaz (Aetherx Extras)
id: blue-topaz-theme-aetherx
settings:
-
id: atx-general
title: 1. General
description: General appearance settings
type: heading
level: 1

App Install Plan

Critical

@gadenbuie
gadenbuie / xaringan-chromote-print.R
Last active November 16, 2023 16:49
Print xaringan slides to PDF, even the complicated ones
#' Print xaringan slides to PDF
#'
#' Prints xaringan slides to a PDF file, even complicated slides
#' with panelsets or other html widgets or advanced features.
#' Requires a local installation of Chrome.
#'
#' @param input Path to Rmd or html file of xaringan slides.
#' @param output_file The name of the output file. If using NULL then
#' the output filename will be based on filename for the input file.
#' If a filename is provided, a path to the output file can also be provided.
@tyrostone
tyrostone / instructions.md
Last active August 16, 2019 03:33
Shiny Server Tutorial

Shiny Server Tutorial Instructions

Prerequisites

  • AWS account is created
  • Non-root user is created
  • VPC exists in the us-east-1 region
    • We can go over the networking of what this should look like

Creating the Host

  1. Log into your AWS account
@lbusett
lbusett / bibtex_2academic.R
Created March 13, 2018 18:56
script for importing publications from a "bibtex" file to a hugo-academic website
#' @title bibtex_2academic
#' @description import publications from a bibtex file to a hugo-academic website
#' @author Lorenzo Busetto, phD (2017) <[email protected]>
bibtex_2academic <- function(bibfile,
outfold,
abstract = FALSE,
overwrite = FALSE) {
require(RefManageR)
@gadenbuie
gadenbuie / backstitch.R
Last active August 14, 2019 16:41
Convert Rmd document (knitr::knit) to an R script (knitr::spin) #RMarkdown #knitr #knit #spin
warning("You probably don't want to use this `backstitch()` function.",
"\n It's hacky and there's a much better option in knitr called `purl()`.",
"\n More info at: `?knitr::purl`")
#' Backstitch an Rmd file to an R script
#'
#' Takes an Rmd file -- that would be converted with knitr::knit() -- and
#' "backstitches" it into an R script suitable for knitr::purl(). The output
#' file is the just the backstitched R script when `output_type = 'script'`, or
#' just the code chunks when `output_type = 'code'` (note that all inline code
@ceshine
ceshine / jupyter_notebook_config.py
Created August 23, 2017 12:31
Jupyter Notebook Post-save Hook: Auto-convert a Python script and a HTML from the notebook
# Reference: https://svds.com/jupyter-notebook-best-practices-for-data-science/
import os
from subprocess import check_call
def post_save(model, os_path, contents_manager):
"""post-save hook for converting notebooks to .py scripts"""
if model['type'] != 'notebook':
return # only do this for notebooks
d, fname = os.path.split(os_path)
check_call(['jupyter', 'nbconvert', '--to', 'script', fname], cwd=d)
# data from http://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/population-distribution-demography/geostat
# Originally seen at http://spatial.ly/2014/08/population-lines/
# So, this blew up on both Reddit and Twitter. Two bugs fixed (southern Spain was a mess,
# and some countries where missing -- measure twice, submit once, damnit), and two silly superflous lines removed after
# @hadleywickham pointed that out. Also, switched from geom_segment to geom_line.
# The result of the code below can be seen at http://imgur.com/ob8c8ph
library(tidyverse)
@pokehanai
pokehanai / 30-markdown-mode.el
Created July 22, 2016 09:35
Emacs config for markdown-mode with orgtbl-mode
(use-package markdown-mode
:defer t
:commands (org-table-begin org-table-end orgtbl-mode)
:config
(progn
(require 'org-table)
(eval-when-compile
(require 'whitespace))
(defun advice:org-table-align:markdown ()