Skip to content

Instantly share code, notes, and snippets.

View ferlzc's full-sized avatar
🐶

Fernando Luiz Cola ferlzc

🐶
View GitHub Profile
SUMMARY = "A Perl DBI driver for Postgresql"
DESCRIPTION = "DBD::Pg is a Perl DBI driver for Postgresql, that includes the entire \
thing in the distribution. So in order to get a fast transaction capable \
RDBMS working for your perl project you simply have to install this \
module, and nothing else. \
"
HOMEPAGE = "https://metacpan.org/dist/DBD-Pg"
SECTION = "libs"
LICENSE = "Artistic-1.0 | GPL-2.0+"
#!/bin/bash
ffmpeg -f alsa -i hw:1 -f video4linux2 -i /dev/video0 -f mpeg output.mp4
#!/usr/bin/python
import os
import time
#os.system('ls -l')
fbset="fbset -t {0} 120 33 99 3 128 58"
print('starting fbtest - clock')
clockMhzInit = input('Insira clock INICIAL em Mhz como integer: ')
clockMhzEnd = input('Insira clock FINAL em Mhz como integer: ')
@ferlzc
ferlzc / StorageInfo Qt
Created November 25, 2019 14:56
Testing Qt StorageInfo
class StorageCheck : public QStorageInfo
{
Q_OBJECT
Q_PROPERTY(QString errorString READ getErrorString NOTIFY errorChanged)
Q_PROPERTY(bool error READ getError NOTIFY errorChanged)
public:
StorageCheck(QString path);
@ferlzc
ferlzc / vim_tips.md
Last active January 18, 2019 00:15
Personal Vim Gist

Moving aroung

Mark

  • mx Set mark x at the current cursor position
  • 'x Jump to the beginning of the line of mark x
  • `x Jump to the marked cursor position
@ferlzc
ferlzc / example.service
Created September 26, 2018 20:47
Systemd Service Example
[Unit]
Description=Name of the service
After=systemd-user-sessions.service
ConditionPathExists=!/usr/bin/python
[Service]
ExecStart=-/usr/bin/appcontroller /usr/bin/qtlauncher --applications-root /data/user/qt
[Install]
WantedBy=multi-user.target
@ferlzc
ferlzc / gist:9cfd926cc8c27a45337011bb8cc18614
Created August 11, 2018 18:18
Prepara Image to be used in Linux boot
ppmquant 224 [file].ppm > [file]_224.ppm
pnmnoraw [file]_224.ppm > [file]_224_ascii.ppm
# DD
1) Snippet for writing a .img file on a block device
```
pv -tpreb [IMAGE] | sudo dd of=[DEVICE] bs=4M conv=notrunc | sync
```
2) Copy an entire block device as .img file
```
sudo dd if=/dev/sdX | gzip -c > [NAME].img
```
http://docs.oracle.com/cd/E19080-01/n1.grid.eng6/817-3606/ftybw/index.html
@ferlzc
ferlzc / ssh
Last active December 17, 2015 09:49
ssh
http://ornellas.apanela.com/dokuwiki/pub:ssh_key_auth
http://henry.precheur.org/system/ssh-copy-id
http://www.debian-administration.org/articles/152
ssh-keygen
ssh-copy-id user@hostname