Skip to content

Instantly share code, notes, and snippets.

View dvinciguerra's full-sized avatar
:octocat:
Bite my shine metal class!!!

Daniel Vinciguerra dvinciguerra

:octocat:
Bite my shine metal class!!!
View GitHub Profile
@dvinciguerra
dvinciguerra / answerfile
Created October 6, 2024 13:00 — forked from oofnikj/answerfile
Install Docker on Termux
KEYMAPOPTS="us us"
HOSTNAMEOPTS="-n alpine"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine
"
TIMEZONEOPTS="-z UTC"
@dvinciguerra
dvinciguerra / irc.md
Created October 3, 2024 13:49 — forked from xero/irc.md
irc cheat sheet

IRC Reference

Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.

The Basics

  • /join #channel
    • Joins the specified channel.
  • /part #channel
  • Leaves the specified channel.
@dvinciguerra
dvinciguerra / gist:700682c7755ad14ad774d425141a662b
Created April 9, 2024 16:22 — forked from pulcheri/gist:2498951
Perl one-liner strings replace
first=$1
second=$2

# Replace
find -name *.cpp -or -name *.h | xargs grep "$first" -l  | xargs perl -pi -e "s/$first/$second/g"

a=getDefaultIncludes; b=get_include_dirs_def; find -name "*.py" -or -name "SC*" | xargs grep "$a" -l  | xargs perl -pi -e "s/$a/$b/g"

a=abc; b=def; find -name "*.cpp" -or -name "*.h" | xargs grep "$a" -l | xargs perl -pi -e "s/$a/$b/g"
@dvinciguerra
dvinciguerra / settings.json
Created January 17, 2024 12:25 — forked from diego3g/NODE.md
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 14,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [80, 120],
"extensions.ignoreRecommendations": true,
"typescript.tsserver.log": "off",
"files.associations": {

FWIW: I (@Rondy) am not the author of the content presented here, which is an outline from Edmond Lau's book. I've just copy-pasted it from somewhere and saved as a personal gist, before it got popular on newsnews.ycombinator.com. I don't remember where exactly the original source is from and neither could find the author's name, so I cannot give him/her the proper credits.


Effective Engineer - Notes

@dvinciguerra
dvinciguerra / itamae_environment.md
Created June 8, 2022 14:17 — forked from imksoo/itamae_environment.md
Itamaeで擬似的にEnvironmentを再現する

Itamaeで擬似的にEnvironmentを設ける時の書き方

Itamae実行時にノードアトリビュートを与えて実行する(itamae -y node.yaml recipe.rb or itamae -j node.json recipe.rb)が、 そのノードアトリビュート内部で擬似的にEnvironment変数を設定しておく。

# nodes/hogehoge-web-server.yaml
environment: development
cookbooks:
    - dnsmasq
@dvinciguerra
dvinciguerra / rubocop.yml
Created June 4, 2022 18:26 — forked from lazaronixon/rubocop.yml
Basecamp Rubocop Template
# This template is inspired on https://github.com/basecamp/audits1984/blob/master/.rubocop.yml
#
# 1 - Add dependencies to group :development, :test
# gem "rubocop", "~> 1.26", require: false
# gem "rubocop-performance", require: false
# gem "rubocop-rails", require: false
#
# 2 - Create a file .rubocop.yml and add the lines below
# inherit_from: https://gist.githubusercontent.com/lazaronixon/7815d84702f277ead5e89c9f2aa5581f/raw/rubocop.yml
#
@dvinciguerra
dvinciguerra / markdown.md
Created May 31, 2022 12:36 — forked from lcuevastodoit/markdown.md
MiniTest quick reference

MiniTest::Spec

use must for positive expectations and wont for negative expectations.

  • must_be | list.size.must_be :==, 0
  • must_be_close_to | subject.size.must_be_close_to 1,1
  • must_be_empty | list.must_be_empty
  • must_be_instance_of | list.must_be_instance_of Array
  • must_be_kind_of | list.must_be_kind_of Enumerable
@dvinciguerra
dvinciguerra / rails.rb
Created February 17, 2022 21:10 — forked from castwide/rails.rb
Enhance Rails Intellisense in Solargraph
# The following comments fill some of the gaps in Solargraph's understanding of
# Rails apps. Since they're all in YARD, they get mapped in Solargraph but
# ignored at runtime.
#
# You can put this file anywhere in the project, as long as it gets included in
# the workspace maps. It's recommended that you keep it in a standalone file
# instead of pasting it into an existing one.
#
# @!parse
# class ActionController::Base
# config/routes.rb
resources :documents do
scope module: 'documents' do
resources :versions do
post :restore, on: :member
end
resource :lock
end
end