Skip to content

Instantly share code, notes, and snippets.

View sebasjm's full-sized avatar
😀

Sebastian Javier Marchano sebasjm

😀
  • Buenos Aires, Argentina
View GitHub Profile
@sebasjm
sebasjm / README.md
Created November 30, 2022 22:20
create ca and cert for localhost

Chrome

  1. go to chrome://settings/certificates
  2. tab "authorities"
  3. button "import"
  4. choose "ca.crt"
  5. trust for identify websites

Firefox

  1. go to about:preferences#privacy
@sebasjm
sebasjm / package.json
Last active August 16, 2023 05:34
preact cli into single html file
{
"name": "preact single html",
"version": "1.0.0",
"description": "",
"scripts": {
"build-single": "preact build --no-sw --no-esm -c preact.single-config.js --dest single && sh remove-link-stylesheet.sh",
},
"keywords": [],
"author": "",
"license": "ISC"
@sebasjm
sebasjm / README.md
Last active March 8, 2021 20:27
Certbot Amazon Linux
@sebasjm
sebasjm / README
Created February 19, 2021 13:55
Docker fail to build
Run
docker build -f dockfile.fail .
it will fail to build. Error:
make: /bin/sh: Operation not permitted
make: /bin/sh: Operation not permitted
make: /bin/sed: Operation not permitted
@sebasjm
sebasjm / machine.js
Last active April 5, 2020 19:04
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions

Keybase proof

I hereby claim:

  • I am sebasjm on github.
  • I am sebasjm (https://keybase.io/sebasjm) on keybase.
  • I have a public key ASCN_MeqzHSF860IGK5IvpNS7MU9dMT-OwgXq3OG6-jKLAo

To claim this, I am signing this object:

@sebasjm
sebasjm / import.sh
Created July 8, 2018 17:23
Importar todos los repositorios de GitHub en un Excel
curl -u "user" "https://api.github.com/orgs/company/repos?per_page=100" | tee result.json
curl -u "user" "https://api.github.com/orgs/company/repos?per_page=100&page=2" | tee result2.json
cat result.json result2.json | jq -s add > all.json
cat all.json | jq '.[]|{"name":.name, "private":.private, "html_url": .html_url, "description": .description, "created_at": .created_at, "updated_at": .updated_at, "pushed_at": .pushed_at, "homepage": .homepage, "stargazers_count": .stargazers_count, "watchers_count": .watchers_count, "language": .language, "archived": .archived, "forks": .forks, "open_issues": .open_issues, "watchers": .watchers}' > filtrado.json
cat filtrado.json | jq -s . | jq -r '(map(keys) | add | unique) as $cols | map(. as $row | $cols | map($row[.])) as $rows | $cols, $rows[] | @csv' > filtrado.csv
#!/usr/bin/env node
require('https').get(`https://crt.sh/?q=%.${process.argv[2]}&output=json`, resp => {
let data = ''
resp.on('data', chunk => {data += chunk;});
resp.on('end', () => {
const json = JSON.parse('['+data.split('}{').join('},{')+']');
const domains = json.map( j => j.name_value ).sort().filter( (i,p,a) => !p || i != a[p-1] )
domains.forEach( d => {
#!/usr/bin/env node
require('https').get(`https://crt.sh/?q=%.${procces.argv[2]}&output=json`, resp => {
let data = ''
resp.on('data', chunk => {data += chunk;});
  resp.on('end', () => {
    const json = JSON.parse('['+data.split('}{').join('},{')+']');
const domains = json.map( j => j.name_value ).sort().filter( (i,p,a) => !p || i != a[p-1] )
domains.forEach( d => {
@sebasjm
sebasjm / README.md
Last active December 13, 2017 19:19
update docker swark service through ssh tunnel

Usage

sh $ DEPLOY_HOST=host.amazonaws.com DEPLOY_PRIVATE_KEY="$(cat id_rsa)" npx https://gist.github.com/sebasjm/18588bf1f49c48204361f78e260e1bae <service-name> <image-name>