Skip to content

Instantly share code, notes, and snippets.

💭
Lambda Lambda Lambda!

Giovanni Bassi giggio

💭
Lambda Lambda Lambda!
Block or report user

Report or block giggio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@giggio
giggio / profiles.json
Last active Jul 21, 2019
My Windows terminal config
View profiles.json
{
"globals": {
"alwaysShowTabs": false,
"defaultProfile": "{e906b7aa-3a1e-41fb-9b20-cbb8ff680e24}",
"initialCols": 120,
"initialRows": 30,
"keybindings": [
{
"command": "closeTab",
"keys": [
@giggio
giggio / feedly.opml
Created Feb 15, 2019
My blogs opml file
View feedly.opml
<?xml version="2.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Giovanni subscriptions in feedly Cloud</title>
</head>
<body>
<outline text="Tiras" title="Tiras">
<outline type="rss" text="Um Sábado Qualquer" title="Um Sábado Qualquer" xmlUrl="http://www.umsabadoqualquer.com/feed/" htmlUrl="https://www.umsabadoqualquer.com"/>
<outline type="rss" text="Dilbert Daily Strip" title="Dilbert Daily Strip" xmlUrl="http://feeds.dilbert.com/DilbertDailyStrip" htmlUrl="http://dilbert.com"/>
@giggio
giggio / copycommit.sh
Created Oct 2, 2018
Copy a commit from any repo to any other repo
View copycommit.sh
git --no-pager --git-dir=<original_dir>/.git format-patch -k -1 --no-color --stdout <commit_sha> | git am -3 -k --ignore-whitespace
@giggio
giggio / installvim.ps1
Last active Aug 26, 2019
A way to install vim on a windows container
View installvim.ps1
# run with iex ((New-Object System.Net.WebClient).DownloadString('https://gist.githubusercontent.com/giggio/8c74f54b5f12cd5e957d19e866d8ec41/raw/52e7a12376cdfa5e23a29972a220685a8f64c9c7/installvim.ps1'))
Invoke-WebRequest http://ftp.vim.org/pub/vim/pc/vim81w32.zip -outfile vim.zip
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory("$(pwd)\vim.zip", 'c:\windows\')
$vimFolder = "C:\windows\vim"
$vim8Folder = "$vimFolder\vim81"
mv $vim8Folder\vim.exe c:\windows
mv $vim8Folder\xxd.exe c:\windows
mv $vim8Folder\tee.exe c:\windows
rm -Recurse -Force $vimFolder
View gist:59bf5967fc609b8a25eff00d852707fc
Verifying my Blockstack ID is secured with the address 1FKYDRHr9gZG3fTWCryNFh97s2Tdm6KwV8 https://explorer.blockstack.org/address/1FKYDRHr9gZG3fTWCryNFh97s2Tdm6KwV8
@giggio
giggio / UpdateNpmWhenUsingNvmForWindows.ps1
Created Dec 7, 2017
If you are using Nvm in Windows you need to reinstall your global npm packages when you change node versions, this helps you do it.
View UpdateNpmWhenUsingNvmForWindows.ps1
npm i -g $( ls $env:programdata\nvm\v8.9.1\node_modules | % { $_.Name } | ? { ! $_.StartsWith('@') -and $_ -ne 'npm' } )
View keybase.md

Keybase proof

I hereby claim:

  • I am giggio on github.
  • I am giggio (https://keybase.io/giggio) on keybase.
  • I have a public key whose fingerprint is A865 8915 939A B7E9 A74D E1F4 AE20 68D3 0CAD E67D

To claim this, I am signing this object:

@giggio
giggio / solving_python_load_problem_in_vim_in_windows.md
Last active Jan 8, 2017
Solving python load problem in Vim in Windows
View solving_python_load_problem_in_vim_in_windows.md

This is according to Bart on StackOverflow. I have tested it on Vim 8.0.118 and Python 2.7.11.

The error I was getting was:

Sorry, this command is disabled, the Python's site module could not be loaded.

If I wanted to check for python, with :echo has('python'), the answer was always 1.

View install-docker-xenial.sh
#!/usr/bin/env bash
apt-get update
apt-get -y install apt-transport-https ca-certificates
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" > /etc/apt/sources.list.d/docker.list
apt-get update
apt-get purge lxc-docker
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
apt-get install -y docker-engine
You can’t perform that action at this time.