Skip to content

Instantly share code, notes, and snippets.

Avatar

Carlos cmpscabral

View GitHub Profile
@cmpscabral
cmpscabral / quasar android
Last active Jun 24, 2020
quasar_android.md
View quasar android
# Install graddle
Download the Gradle Binary Only Distribution from https://gradle.org/gradle-download/
Open a terminal
Run the following to unzip the android sdk to the Development directory that is under your user home directory
unzip ~/Downloads/gradle-3.1-bin.zip -d ~/Development
Open up the vi editor and edit your bash profile. We need to add in the GRADLE_HOME environment variable
@cmpscabral
cmpscabral / pass-slots.md
Created Jun 8, 2020 — forked from loilo/pass-slots.md
Vue: Pass Slots through from Parent to Child Components
View pass-slots.md

Vue: Pass Slots through from Parent to Child Components

The Situation

  • We've got some components A, B and C which provide different slots.
    const A = {
      template: `<div><slot name="a">Default A Content</slot></div>`
    }
    
    const B = {
@cmpscabral
cmpscabral / webpack-cache-chunk.js
Created Apr 6, 2020
quasar, cache busting, webpack, keep names
View webpack-cache-chunk.js
// First add this to your webpack config:
mix.webpackConfig({
output: {
chunkFilename: '[name].js?id=[chunkhash]',
}
});
//Then, when you specify the chunk name using this: /* webpackChunkName: "js/dashboard" */
//You will get this as a result: js/dashboard.js?id=0791710073c12eff5a3d in the webpack output dialog.
@cmpscabral
cmpscabral / gist:b650be23cd37cdfc9f3213c2ae53d201
Created Feb 17, 2020
forward traffic to virtual machine
View gist:b650be23cd37cdfc9f3213c2ae53d201
echo "
rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443
" | sudo pfctl -ef -
@cmpscabral
cmpscabral / pdfconvert-a
Last active Oct 15, 2019
convert PDF to PDF/a
View pdfconvert-a
gs -dPDFA -dBATCH -dNOPAUSE -dUseCIEColor -sProcessColorModel=DeviceCMYK -sDEVICE=pdfwrite -sPDFACompatibilityPolicy=1 -sOutputFile=output.pdf input.pdf
@cmpscabral
cmpscabral / firebird
Last active Jun 26, 2019
firebird export
View firebird
1) download firebird 2.5
2) install as a service
3) connect to database
> isql.exe <databasefile> -u sysdba -p masterkey
4) show tables
SQL> show tables
View makeswap.sh
mkdir -p swap1
cd swap1
dd if=/dev/zero of=swapfile bs=1M count=2000
mkswap swapfile
swapon swapfile
chmod 600 swapfile
@cmpscabral
cmpscabral / cr2tojpeg
Created Jan 20, 2019
convert CR2 to JPEG
View cr2tojpeg
for i in *.CR2; do sips -s format jpeg $i --out "${i%.*}.jpg"; done
@cmpscabral
cmpscabral / Country Currency Codes JSON
Created Jul 10, 2018 — forked from grosscorporation/Country Currency Codes JSON
currency symol, name, plural, and decimal digits for all major and minor currencies
View Country Currency Codes JSON
[
{
"USD" : {
"symbol" : "$",
"name" : "US Dollar",
"symbol_native" : "$",
"decimal_digits" : 2,
"rounding" : 0,
"code" : "USD",
"name_plural" : "US dollars"
@cmpscabral
cmpscabral / instal.sh
Created Apr 13, 2018
install docker mysql
View instal.sh
curl -sSL https://get.docker.com/ | sh
sudo docker run --name mysql-57-container -p 127.0.0.1:3310:3306 -e MYSQL_ROOT_PASSWORD=rootpassword -d mysql:5.7
mysql -u root -p --host=127.0.0.1 --port=3310
You can’t perform that action at this time.