Skip to content

Instantly share code, notes, and snippets.

View ferox's full-sized avatar
🏠
Working from home

Fernando "ferox" dos Santos ferox

🏠
Working from home
View GitHub Profile
@ferox
ferox / rails_annotations.md
Last active January 12, 2018 19:14 — forked from daltonjorge/rails_annotations.md
Explicações de conceitos do Rails e outras infos úteis.

Active Record

É um design pattern que o Rails implementa a partir da gem ActiveRecord.

Serve para conectar a camada Model da aplicação com tabelas do database, para assim criar um modelo de domínio persistível, onde a lógica (Model) e dados (BD) são apresentados em uma única solução.

Já persiste no BD:

obj.create
@ferox
ferox / postgres-cheatsheet.md
Created January 20, 2018 18:22 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@ferox
ferox / 99-synaptics-overrides.conf
Last active March 9, 2018 17:01 — forked from cstrouse/99-synaptics-overrides.conf
Enables tap-to-click functionality for the touchpad on the HP Mini under Fedora 26 with LXQt
Section "InputClass"
Identifier "touchpad overrides"
MatchIsTouchpad "on"
Driver "libinput"
Option "Tapping" "on"
EndSection
Proprietary Broadcom drivers are packaged and available in the rpmfusion repo.
Verify that your card is a Broadcom using: `lspci -vnn -d 14e4:`
**Sample output:**
02:00.0 Network controller [0280]: Broadcom Corporation BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)
## Install
Install the [rpmfusion](http://rpmfusion.org/) repo, note only "nonfree" is required, as the Broadcom Driver is proprietry: http://rpmfusion.org/
@ferox
ferox / gitkraken on Fedora
Last active June 14, 2018 10:58 — forked from aelkz/[FEDORA] gitkraken
How to install gitkraken on Fedora 27 + launcher icon
#!/bin/bash
# Download GitKraken
wget https://release.gitkraken.com/linux/gitkraken-amd64.tar.gz
# copy the downloaded file into /opt directory
cp gitkraken-amd64.tar.gz /opt/gitkraken
cd /opt
@ferox
ferox / install-jekyll-fedora.sh
Last active August 10, 2018 20:47 — forked from tiagohm/install-jekyll-fedora.sh
Instalar Jekyll no Fedora 27 / Install Jekyll on Fedora 27
dnf install ruby ruby-devel redhat-rpm-config gcc gcc-c++
gem install json
gem install jekyll bundler
gem update --system
@ferox
ferox / settings.json
Last active April 17, 2020 00:06 — forked from diego3g/settings.json
Configuração do Visual Code para desenvolvedores JavaScript
{
"files.autoSave": "afterDelay",
"window.zoomLevel": 0.2,
"editor.tabSize": 2,
"diffEditor.ignoreTrimWhitespace": false,
"workbench.startupEditor": "newUntitledFile",
"workbench.colorTheme": "Dracula",
"editor.fontSize": 15,
"editor.fontFamily": "Fira Code",
"editor.fontLigatures": true,
# Extension do VSCode para Desenvolvimento de Aplicações com Laravel e JavaScript (JQuery).
code --install-extension akamud.vscode-javascript-snippet-pack
code --install-extension bmewburn.vscode-intelephense-client
code --install-extension cjhowe7.laravel-blade
code --install-extension ctf0.laravel-goto-config
code --install-extension ctf0.laravel-goto-controller
code --install-extension ctf0.laravel-goto-env
code --install-extension ctf0.laravel-goto-view
code --install-extension dbaeumer.vscode-eslint
code --install-extension dracula-theme.theme-dracula

There are two types of markup in Liquid: Output and Tag.

  • Output markup (which may resolve to text) is surrounded by
{{ matched pairs of curly brackets (ie, braces) }}
  • Tag markup (which cannot resolve to text) is surrounded by
@ferox
ferox / tls_test.php
Created August 29, 2023 12:13 — forked from olivierbellone/tls_test.php
Simple TLS version test for PHP, using howsmyssl.com
<?php
$ch = curl_init('https://www.howsmyssl.com/a/check');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$data = curl_exec($ch);
curl_close($ch);
$json = json_decode($data);
echo "<pre>TLS version: " . $json->tls_version . "</pre>\n";