Skip to content

Instantly share code, notes, and snippets.

View amaurycatelan's full-sized avatar
🌻
what's up, doc?

Amaury Catelan amaurycatelan

🌻
what's up, doc?
View GitHub Profile
@amaurycatelan
amaurycatelan / init.el
Created January 2, 2024 04:46 — forked from groverburger/init.el
My personal Emacs config file
(setq custom-file (concat user-emacs-directory "auto-custom.el"))
(setq byte-compile-warnings '((not cl-functions)))
;(load custom-file 'noerror)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; set up and make sure packages are installed
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(setq package-archives
'(("melpa" . "https://melpa.org/packages/")
@amaurycatelan
amaurycatelan / ffmpeg-cut-out-video.cmd
Created December 10, 2023 22:17 — forked from joshschmelzle/ffmpeg-cut-out-video.cmd
Cut a video without re-encoding with ffmpeg
ffmpeg -i input.mp4 -c copy -ss 00:04:25.000 -to 00:09:25.000 output.mp4
@amaurycatelan
amaurycatelan / simple_calculator.py
Created July 6, 2022 13:44 — forked from ro6ley/simple_calculator.py
Unit Testing in Python using UnitTest Framework
#!/usr/bin/env python3
class SimpleCalculator:
def sum(self, a, b):
""" Function to add two integers """
if isinstance(a, int) and isinstance(b, int):
return a + b
else:
return "ERROR"
@amaurycatelan
amaurycatelan / blogger-forx.xml
Created April 20, 2022 21:08 — forked from kran/blogger-forx.xml
blogger theme ported from typecho theme (forx)
<?xml version="1.0" encoding="utf-8"?>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:b="http://www.google.com/2005/gml/b" xmlns:data="http://www.google.com/2005/gml/data" xmlns:expr="http://www.google.com/2005/gml/expr">
&lt;!--<head>--&gt;&lt;head&gt;
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta content="telephone=no" name="format-detection" />
<meta name="renderer" content="webkit" />
<b:include data="blog" name="all-head-content"/>

How To - Upload and add Images to markdown files in Gist

Markdown files allow embedding images in it. However it requires the image to be hosted at some location and we can add the url of the image to embed it.

Example: ![Alternate image text](https://someurl/imagelocation/image.png)

We can use services like imgur or other services to host the images and use the hosted URL.

@amaurycatelan
amaurycatelan / markdown-details-collapsible.md
Created August 15, 2021 15:50 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
@amaurycatelan
amaurycatelan / transparency.ahk
Created May 18, 2021 04:14 — forked from Zazcallabah/transparency.ahk
AutoHotkey Script for controlling transparency of windows. I cant remember who made this, saved for future reference
; [Win+A] Toggle always on top
#a:: Winset, Alwaysontop, , A
; [Win+WheelUp] Increase opacity
#WheelUp::
DetectHiddenWindows, on
WinGet, curtrans, Transparent, A
if ! curtrans
curtrans = 255
newtrans := curtrans + 8
@amaurycatelan
amaurycatelan / tmux-cheatsheet.markdown
Created April 17, 2021 04:21 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@amaurycatelan
amaurycatelan / tmux.conf
Created April 12, 2021 18:10 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
@amaurycatelan
amaurycatelan / tmux__CentOS__build_from_source.sh
Created April 11, 2021 03:21 — forked from P7h/tmux__CentOS__build_from_source.sh
tmux 2.0 and tmux 2.3 installation steps for Ubuntu. Or build from tmux source v2.5 for Ubuntu and CentOS.
# Steps to build and install tmux from source.
# Takes < 25 seconds on EC2 env [even on a low-end config instance].
VERSION=2.7
sudo yum -y remove tmux
sudo yum -y install wget tar libevent-devel ncurses-devel
wget https://github.com/tmux/tmux/releases/download/${VERSION}/tmux-${VERSION}.tar.gz
tar xzf tmux-${VERSION}.tar.gz
rm -f tmux-${VERSION}.tar.gz
cd tmux-${VERSION}