Skip to content

Instantly share code, notes, and snippets.

View SmetDenis's full-sized avatar
🏠
Working at home

Denis Smet SmetDenis

🏠
Working at home
View GitHub Profile
@umputun
umputun / safari-summary.sh
Last active May 21, 2024 07:06
Raycast script for Safari's page summary
#!/bin/sh
# @raycast.schemaVersion 1
# @raycast.title Summarize Safari page
# @raycast.mode fullOutput
#
# Optional parameters:
# @raycast.icon ✨
#
# @raycast.packageName Things
@henrik242
henrik242 / Global macOS hotkeys for Google Meet, Spotify and others using AppleScript and Fastscripts.md
Last active June 15, 2024 13:20
Global macOS hotkeys for Google Meet, Spotify and others using AppleScript and Fastscripts
@3v1n0
3v1n0 / fish-shell-bash-complete-function.sh
Last active March 11, 2024 13:46
Use bash completions in Fish Shell
#!/usr/bin/fish
# You can add this to your ~/.config/fish/config.fish
function __fish_complete_bash
set cmd (commandline -cp)
bash -c "source get-bash-completions.sh; get_completions '$cmd'"
end
# Set the tool to use bash completions
@gagarine
gagarine / fish_install.md
Last active June 5, 2024 20:25
Install fish shell on macOS Mojave with brew

Installing Fish shell on MacOS (Intel and M1) using brew

Fish is a smart and user-friendly command line (like bash or zsh). This is how you can instal Fish on MacOS and make your default shell.

Note that you need the https://brew.sh/ package manager installed on your machine.

Install Fish

brew install fish

################ copy/replace file to ~/.bash_aliases
################ Tuning bash ###########################################################################################
# Command line history
export HISTCONTROL=ignoredups:ignorespace
export HISTFILESIZE=10000000
export HISTSIZE=1000000
shopt -s histappend # Append to the history file, don't overwrite it
shopt -s checkwinsize # Check the window size after each command and, if necessary, update the values of LINES and COLUMNS.
FROM php:5.5-fpm
RUN apt-get update && \
apt-get install -y php5-dev php-pear php5-common curl libcurl4-openssl-dev libpng-dev libfreetype6-dev libjpeg-dev libxml2-dev libpq-dev php5-memcached wget php5-intl libicu-dev default-jre libmemcached-dev && \
rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install bcmath
RUN docker-php-ext-enable bcmath
@SmetDenis
SmetDenis / .bash_profile
Last active May 30, 2018 13:31
jbzoo bashrc
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
@SmetDenis
SmetDenis / hexlet.js
Last active September 22, 2016 16:04
Javascript helpers for hexlet courses
const dump = (vars, label) => console.log(label ? label : 'dump', ':', vars);
// Or stringify
const dump = (vars, label = 'dump', prettyPrint = false) => {
if (prettyPrint) {
console.log(`${label}:`, JSON.stringify(vars, null, 3));
} else {
console.log(`${label}:`, vars);
}
};
@runspired
runspired / form.html
Created May 23, 2016 13:46
How to turn off password and email/username autocomplete.
<!--
<form autocomplete="off"> will turn off autocomplete for the form in most browsers
except for username/email/password fields
-->
<form autocomplete="off">
<!-- fake fields are a workaround for chrome/opera autofill getting the wrong fields -->
<input id="username" style="display:none" type="text" name="fakeusernameremembered">
<input id="password" style="display:none" type="password" name="fakepasswordremembered">
#!/usr/bin/env sh
------------------------------------------
openssl genrsa -out jbzoo-com-ca.key 2048
openssl req -x509 -new -key jbzoo-com-ca.key -days 10000 -out jbzoo-com-ca.crt
openssl genrsa -out jbzoo-com-server.key 2048
openssl req -new -key jbzoo-com-server.key -out jbzoo-com-server.csr
openssl x509 -req -in jbzoo-com-server.csr -CA jbzoo-com-ca.crt -sha256 -CAkey jbzoo-com-ca.key -CAcreateserial -out jbzoo-com-server.crt -days 5000