Skip to content

Instantly share code, notes, and snippets.

View luis-puhl's full-sized avatar

Luís Puhl (TG) luis-puhl

  • Nubank
  • São Carlos - Brasil
View GitHub Profile
@luis-puhl
luis-puhl / CSS-Responsive-form.markdown
Created October 3, 2013 23:23
A Pen by Luís Henrique Puhl.
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-a',
templateUrl: `<p>
a works!
</p>
<app-b>app-b</app-b>`,
styleUrls: []
})
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'app-a',
template: `<p>a works!</p>
<app-b>app-b</app-b>`
})
export class AComponent implements OnInit {
constructor() { }
@luis-puhl
luis-puhl / fucking-fast-tcp-ssh-transfer.sh
Last active February 22, 2023 20:22
Using Gzip, multicore, SSH-tunnel to transfer files faster
#!/bin/bash
# the same, no tunnel.
ssh remote "tar -c /some/stuff | pv | pigz" | pigz -d | tar x
### Let's start by going to the remote with SSH, also leaving a SSH-Tunnel
# you@local:~ $
ssh remote -L 31000:127.0.0.1:31000
### Then we:
@luis-puhl
luis-puhl / trash-images-one-color.sh
Last active April 11, 2019 12:17
Search, Seek and Destroy: All images with only one color. For the rest, turn white to transparent. Do it in 60 processes.
#!/bin/bash
# start time, to know how long it took
start=`date +%s.%N`;
# counter, to know how many files we processed
i=0;
# Max concurrent processes
waitevery=60;