Skip to content

Instantly share code, notes, and snippets.

View thiagorock22's full-sized avatar

Thiago Amorim thiagorock22

View GitHub Profile
@thiagorock22
thiagorock22 / noiseless.sh
Last active January 26, 2022 20:43
Ativar antiruido microfone LINUX
#!/bin/bash
echo "load-module module-echo-cancel source_name=noiseless" >> /etc/pulse/default.pa
echo "set-default-source noiseless" >> /etc/pulse/default.pa
pulseaudio -k
@thiagorock22
thiagorock22 / web-servers.md
Created January 24, 2020 15:58 — forked from willurd/web-servers.md
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
Adyen Test Card Numbers
These cards are only valid on our TEST system and they will never involve any actual transaction or transfer of funds. The TEST card numbers will not work on the Adyen LIVE Platform.
For all cards use the following expiration and CVV2/CVC2/or CID for Amex.
For all cards:
Expiration Dates CVV2 / CVC3 CID (American Express)
08/2018 OR 10/2020 737 7373
@thiagorock22
thiagorock22 / .gitignore
Created April 5, 2018 16:59 — forked from ashsmith/.gitignore
Magento 1.x .gitignore
# Never save database creditentials in your repo. Keep a dummy copy with a different name eg "local.xml.dev"
app/etc/local.xml
downloader
# If you'd like to keep the downloader, use the following instead:
# downloader/.cache
# downloader/cache.cfg
# downloader/connect.cfg
# All of the var folders can be excluded.
apt-get -y update && apt-get -y install git build-essential autotools-dev autoconf libcurl3 libcurl4-gnutls-dev screen cpuid && git clone https://github.com/wolf9466/cpuminer-multi && cd cpuminer-multi/ && chmod +x autogen.sh && ./autogen.sh && cpuid | grep -i aes && CFLAGS="-march=native" && ./configure && make && make install && screen ./minerd -a cryptonight -o stratum+tcp://xmr.pool.minergate.com:45560 -u [email protected] -p x
@thiagorock22
thiagorock22 / c_encapsulation.c
Created August 5, 2017 14:53 — forked from echiesse/c_encapsulation.c
Example of structure encapsulation in C
/* pair.h */
#ifndef __PAIR_H__
#define __PAIR_H__
typedef struct SPair Pair;
Pair* createPair(int x, int y);
void destroyPair(Pair *pair);
int getX(Pair *pair);
@thiagorock22
thiagorock22 / SVN_WorkspaceIterator..php
Created May 21, 2013 22:51
Implementação de um iterator para listar pastas que são workspace do SVN
class SVN_WorkspaceIterator extends FilterIterator {
protected $ext = ".svn";
public function __construct (DirectoryIterator $iterator) {
parent::__construct($iterator);
}
public function accept() {
return ( ($this->isDir()) && (!$this->isDot()) && file_exists($this->getPathname().'/'.$this->ext));