Skip to content

Instantly share code, notes, and snippets.

View uilian's full-sized avatar
🏠
Working from home

Uilian Souza uilian

🏠
Working from home
View GitHub Profile
@uilian
uilian / kubectl-commands.md
Created February 9, 2024 19:34 — forked from DStorck/kubectl-commands.md
kubectl commands

filter kubernetes response with kubectl

make file with all results , then filter into new file

kubectl get nodes > all_nodes.txt

cat all_nodes.txt | while read line ; do if [[ $line == *"sobusy"* ]]; then echo $line; fi; done > filtered_nodes.txt

filter results by search criteria

kubectl logs <pod> <search_criteria> > some_file.txt

@uilian
uilian / git_fetch_pull_all_subfolders.sh
Created December 11, 2023 15:30 — forked from mnem/git_fetch_pull_all_subfolders.sh
Simple bash script for fetching and pulling all repos in the executed folder to the latest of the branch they are on
#!/bin/bash
################
# Uncomment if you want the script to always use the scripts
# directory as the folder to look through
#REPOSITORIES="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
REPOSITORIES=`pwd`
IFS=$'\n'
@uilian
uilian / git-branches-by-commit-date.sh
Created May 6, 2021 14:48 — forked from jasonrudolph/git-branches-by-commit-date.sh
List remote Git branches and the last commit date for each branch. Sort by most recent commit date.
# Credit http://stackoverflow.com/a/2514279
for branch in `git branch -r | grep -v HEAD`;do echo -e `git show --format="%ci %cr" $branch | head -n 1` \\t$branch; done | sort -r
@uilian
uilian / docker_debugging.md
Created January 29, 2020 12:28 — forked from veuncent/docker_debugging.md
Debugging Django apps running in Docker using ptvsd - Visual Studio (Code)

Remote debugging in Docker (for Django apps)

In order to enable debugging for your Django app running in a Docker container, follow these steps using Visual Studio (Code):

  1. Add ptvsd to your requirements.txt file
ptvsd == 4.3.2
  1. To your launch.json, add this:
@uilian
uilian / Interview.js
Created February 11, 2016 13:52 — forked from radupotop/Interview.js
Interview
/*
1. Whats the difference between a local and a global variable. Implement a bug that could be
caused by accidentally forgetting to var a local variable
*/
/**
A global variable is found in the global scope, eg. the window object, and can
be accessed from any other scope.
A local variable is contained within the scope of a function and can only be
############################################################
# Dockerfile to build Pentaho EE BA Server container images
# Based on Ubuntu 14.04
############################################################
FROM ubuntu:14.04
MAINTAINER Matt Tucker, matthewtckr@gmail.com
## Install Base Software
RUN apt-get update -y
@Grab(group="org.twitter4j", module="twitter4j-core", version="4.0.2")
import twitter4j.*
import twitter4j.api.*
import twitter4j.conf.*
import org.pentaho.reporting.engine.classic.core.util.TypedTableModel;
colNames = ['Screen Name', 'Tweet Date', 'Text'] as String[]
colTypes = [String, Date, String] as Class[]
model = new TypedTableModel(colNames, colTypes);