Skip to content

Instantly share code, notes, and snippets.

View zvictor's full-sized avatar
🐥

Victor Duarte zvictor

🐥
View GitHub Profile
import * as cdk from 'aws-cdk-lib'
import * as ec2 from 'aws-cdk-lib/aws-ec2'
import * as ecs from 'aws-cdk-lib/aws-ecs'
import * as efs from 'aws-cdk-lib/aws-efs'
import * as logs from 'aws-cdk-lib/aws-logs'
export class BaseStack extends cdk.Stack {
constructor(scope: cdk.App, id: string, environment: Record<string, string>, props?: cdk.StackProps) {
super(scope, id, props)
url="https://www.sky-tours.com/book.php?lang=br&book=T%3A0%3A0%7C0%3A0&key=GRULIS01%2F29%2F20199900LISGRU02%2F12%2F20199900Y010000&life=259200&api=8DvtxVAx0a24RCclYM98SXNMREhsn7Rttjqw18y%2BADwnCP7f5s%2Fr%2BiR433%2F0GhGy&session=7ffa6218-3fe9-4abb-b334-df2ad0231d74&check=Zqu1N8OWSNSgKJZnr0GKMzdC0Y1diINlC1peKuMVM9l27dG29UP0dfQ8TMa9UvH7mGqgRv7mh6LIeoPQzUKxF%2Byx1tl%2BROygG4DhTsV1%2FdmqjsCRb7GbztH4oEA1ZN5tG58BrBRBTaCLR1y9P5YuIjK64GMD%2Fim8GC2RtGOF1Cw%3D&sdata=mBxS%2B3rVvwH6%2BBlfqs0ln0WWSYlMYEnnJdeo%2Fy8Oad7jWZjj%2BfIHjEg3sc5DBwPDaIAt11ISI3EuqbYV%2BNsmGL5MkFPUhRRyi17soJvXYMU%3D"
# url="https://google.com"
echo "waiting for: $url"
echo ""
while ! (wget -q -O - "$url" > /dev/null) ; do
echo 'failed attempt'
done
while true ; do
@zvictor
zvictor / Git alias
Last active November 16, 2016 16:13
A simplified version of the git commands found on http://www.praqma.com/stories/a-pragmatic-workflow/
# Based on http://www.praqma.com/stories/a-pragmatic-workflow/
#
# Add this to your git configurations using:
# $ git config --global --edit
[alias]
issue-branch = "!f() { MATCH=#$1:; ghi show $1 2>/dev/null | grep $MATCH | sed s/$MATCH/$1/g | sed 's/ /-/g' | sed s/[:\\']//g; }; f"
issue-wip = "!f() { ghi label $1 'in progress'; }; f"
work-on = "!f() { BRANCH=`git issue-branch $1`; git fetch origin; git checkout $BRANCH 2> /dev/null || git checkout -b $BRANCH; git issue-wip $1; ghi assign $1; }; f"
box: ubuntu:16.04
services:
- mongo # http://devcenter.wercker.com/docs/services/mongodb.html
initial-build:
steps:
- script:
name: start apt-get
code: |
apt-get update
@zvictor
zvictor / react.css.js
Created June 3, 2016 17:23
List of css modules for React to be evaluated at http://www.timqian.com/star-history/
var list = ['Khan/aphrodite',
'martinandert/babel-plugin-css-in-js',
'rtsao/csjs',
'webpack/css-loader',
'jareware/css-ns',
'krasimir/cssx',
'colingourlay/hyperstyles',
'j2css/j2c',
'petehunt/jsxstyle',
'FormidableLabs/radium',
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<link href='http://fullcalendar.io/js/fullcalendar-2.3.1/fullcalendar.css' rel='stylesheet' />
<link href='http://fullcalendar.io/js/fullcalendar-2.3.1/fullcalendar.print.css' rel='stylesheet' media='print' />
<script src='http://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js'></script>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src='http://fullcalendar.io/js/fullcalendar-2.3.1/fullcalendar.js'></script>
@zvictor
zvictor / FilterStyle.js
Created September 26, 2014 09:18
FilterStyle: Display/hidden elements by js according to class selectors
function FilterStyle(name, show) {
"use strict";
// @see http://stackoverflow.com/a/8630641/599991
// @see http://www.happycode.info/create-css-classes-with-javascript/
this.name = name;
this.show = show;
if(show !== undefined)
this.update();
#!/bin/bash
sleep 1
DISPLAY=":0.0"
HOME=/home/zvictor/
XAUTHORITY=$HOME/.Xauthority
export DISPLAY XAUTHORITY HOME
usbkbd_ids=`xinput -list | grep "Keyboard" | awk -F'=' '{print $2}' | cut -c 1-2`
usbkbd_layout="dk"
for ID in $usbkbd_ids; do
gsettings set org.gnome.settings-daemon.plugins.keyboard active false
@zvictor
zvictor / modulus.npm.log
Created August 8, 2013 18:51
npm log from Modulus
$ modulus deploy
Welcome to Modulus
You are logged in as zvictor
[?] Are you sure you want to use project slirp? (yes)
Compressing project...
636.8 KB written
Uploading project...
Upload progress [===================] 100%
Deploying Project...
INFO: Attaching persistent storage.