Skip to content

Instantly share code, notes, and snippets.

View gusbemacbe's full-sized avatar
🎯
Focusing

Gustavo Benedetto Papi Muñiz Costa gusbemacbe

🎯
Focusing
View GitHub Profile
@arthurborgesdev
arthurborgesdev / .p10k.zsh
Created July 26, 2021 14:50
Powerlevel 10k config file
# Generated by Powerlevel10k configuration wizard on 2020-06-20 at 00:56 -03.
# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 15764.
# Wizard options: nerdfont-complete + powerline, small icons, rainbow, unicode,
# 24h time, angled separators, sharp heads, flat tails, 2 lines, disconnected,
# left frame, lightest-ornaments, sparse, many icons, fluent, transient_prompt,
# instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with powerline prompt style with colorful background.
# Type `p10k configure` to generate your own config based on it.
@shanselman
shanselman / profile.json
Created May 7, 2019 04:22
Windows Terminal Profile
{
"defaultProfile": "{7d04ce37-c00f-43ac-ba47-992cb1393215}",
"initialRows": 30,
"initialCols": 120,
"alwaysShowTabs": true,
"showTerminalTitleInTitlebar": true,
"experimental_showTabsInTitlebar": true,
"requestedTheme": "dark",
"profiles": [
{
@ansulev
ansulev / install-photoshop-cs6.md
Last active April 8, 2024 04:28 — forked from romuloctba/readme.md
Install Adobe Photoshop CS6 on Wine (Arch Linux)

Step 1. Install the Wine and Winetricks

  sudo pacman -S wine winetricks

Step 2. Using winetricks to get install dependencies for Photoshop CS6

winetricks atmlib gdiplus msxml3 msxml6 vcrun2005 vcrun2005sp1 vcrun2008 ie6 fontsmooth-rgb gecko
@sgtoj
sgtoj / persistent_c_mount_wsl.sh
Last active January 29, 2024 06:11
Ubuntu for Windows: Mounting C: Drive to WSL's Root
# allow `mount` cmd without password
echo "$USER ALL=NOPASSWD: /bin/mount" | (sudo su -c 'EDITOR="tee -a" visudo')
# add the mount directive to `fstab`
sudo mkdir -p /c
sudo sh -c "echo '/mnt/c /c none bind' >> /etc/fstab"
# update to `.bashrc` to auto mount at login
echo "sudo mount -a" >> ~/.bashrc
# now reload it
source ~/.bashrc
@clemlatz
clemlatz / smooth-scroll.js
Created September 6, 2017 08:56
Simple smooth-scroll animation in pure/vanilla javascript
/**
* Smooth scroll animation
* @param {int} endX: destination x coordinate
* @param {int) endY: destination y coordinate
* @param {int} duration: animation duration in ms
*/
window.smoothScrollTo = function(endX, endY, duration) {
var startX = window.scrollX || window.pageXOffset,
startY = window.scrollY || window.pageYOffset,
distanceX = endX - startX,
@zmwangx
zmwangx / # macOS 10.12.2 default fonts.md
Last active December 21, 2019 09:21
macOS 10.12.2 default fonts

See script for details of each file.

Apple Support article Fonts included with macOS Sierra is also a good resource, but it is fairly confusing in certain ways, e.g. Songti SC is listed both under fonts that are "installed and enabled automatically by macOS Sierra" and that are "available for download in macOS Sierra" (Update. I checked macOS 10.12 and Songti SC has been there all along).

There is also a seemingly very informative article, Font Management in macOS and OS X by Kurt Lang, which I found via Google Search. This is where I found out about the new directory /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ ATS.framework/Versions/A/Resources/FontInfo in macOS Sierra which has replaced Stub Fonts in Font Book.app.

@iacchus
iacchus / Show_Images_in_Terminal_Emulator.md
Last active October 6, 2023 04:16
Show Images in terminal emulator
@travis-g
travis-g / font-face.css
Last active January 21, 2021 07:57
Possible Emoji @font-face rule
@font-face {
font-family: 'emoji';
src:
local('Apple Color Emoji');
local('Noto Color Emoji');
local('Android Emoji');
local('Segoe UI');
local(EmojiSymbols);
unicode-range:
U+1f300-1f5ff, /* misc symbols + pictographs */
#!/usr/bin/env ruby
require 'net/http'
def convert_currency(from_curr, to_curr)
doc = Net::HTTP.get('www.google.com', "/finance/converter?a=1&from=#{from_curr}&to=#{to_curr}")
regexp = Regexp.new("(\\d+\\.{0,1}\\d*)\\s+#{to_curr}")
regexp.match doc
$1.to_f
end
@hightemp
hightemp / gist:11196851
Last active February 18, 2024 12:08
Convert .vdi to .img
vboxmanage clonehd image.vdi image.img --format RAW
qemu-img convert -f vdi -O raw image.vdi image.img
vbox-img convert --srcfilename image.vdi --stdout --srcformat VDI --dstformat RAW image.img