Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

function Get-AccessToken
{
param
(
[Parameter()]
[System.Diagnostics.Process[]]
$Process
)
begin
@NeatMonster
NeatMonster / README.md
Last active April 23, 2024 09:23
A simple hexdump module for Python

Simple Hexdump

A simple hexdump module for Python.

Installation

The preferred installation method is:

pip install simple-hexdump
@cami-la
cami-la / resumo_POO.md
Last active April 23, 2024 09:23
Resumo Sobre o Paradigma de Programação Orientado a Objetos

📚 Paradigma de Programação Orientado a Objetos (POO)

✨ LINGUAGEM DE PROGRAMAÇÃO

É uma linguagem formal que, através de uma série de instruções, permite que um programador escreva um conjunto de ordens, ações consecutivas, dados e algoritmos para criar programas que controlam o comportamento físico e lógico de uma máquina.

✨ LIGUAGEM DE PROGRAMAÇÃO JAVA

  • Java é uma linguagem de programação orientada a objetos desenvolvida na empresa Sun Microsystems e posteriormente adquirida pela Oracle em 2008.
  • Tornou-se popular pelo seu uso na internet e está presente em navegadores, programas e jogos de computador, celular, calculadoras, etc...
@Septdir
Septdir / README.md
Last active April 23, 2024 09:19
Joomla! 5.1 Control panel change color scheme.

Русский

Создайте модуль HTML для панели управления в позиции status и вставите туда код

English

Create an HTML module for the control panel in the 'status' position and insert the code there.

@dastergon
dastergon / ec2_info_retriever.py
Last active April 23, 2024 09:19
A basic boto3 based tool for retrieving information from running EC2 instances.
from collections import defaultdict
import boto3
"""
A tool for retrieving basic information from the running EC2 instances.
"""
# Connect to EC2
ec2 = boto3.resource('ec2')
@lucasrenan
lucasrenan / k8s.sh
Created April 30, 2019 17:50
Kubernetes get all pods/containers resources requests/limits
kubectl get pods --all-namespaces --sort-by='.metadata.name' -o jsonpath='{.items[*].spec.containers[*].resources.limits.memory}'
kubectl get pod --all-namespaces --sort-by='.metadata.name' -o json | jq -r '[.items[] | {pod_name: .metadata.name, containers: .spec.containers[] | [ {container_name: .name, memory_requested: .resources.requests.memory, cpu_requested: .resources.requests.cpu} ] }]'
@mattlewissf
mattlewissf / add-p.md
Last active April 23, 2024 09:19
Lightning Talk: Git add -p

git add -p is your friend

git add -p is basically "git add partial (or patch)"

Patch mode allows you to stage parts of a changed file, instead of the entire file. This allows you to make concise, well-crafted commits that make for an easier to read history. This feature can improve the quality of the commits. It also makes it easy to remove parts of the changes in a file that were only there for debugging purposes - prior to the commit without having to go back to the editor.

It allows you to see the changes (delta) to the code that you are trying to add, and lets you add them (or not) separately from each other using an interactive prompt. Here's how to use it:

from the command line, either use

  • git add -p
@iampaul83
iampaul83 / READMD.md
Last active April 23, 2024 09:19
Spring Data JPA Enum converter

Spring Data JPA Enum converter

Column 使用 NUMBER 型別,如何在 JPA 中用 Enum 做 mapping,且不使用 @Enumerated(EnumType.ORDINAL)

CREATE TABLE CHALLENGE_LOG (
  ACTION NUMBER(1) NOT NULL
);
COMMENT ON COLUMN CHALLENGE_LOG.ACTION IS '0=Send OTP, 1=Verify OTP';
@mcollina
mcollina / publish.sh
Created August 12, 2022 22:22
npm workspace publish
#!/bin/sh
VERSION=$1
MODULES=`node -e "console.log(require('./package.json').workspaces.join(' '))"`
for MODULE in $MODULES; do
echo "Building $MODULE"
pushd $MODULE
npm version $VERSION --save
NAME=`node -e "console.log(require('./package.json').name)"`