Skip to content

Instantly share code, notes, and snippets.

View rodcordeiro's full-sized avatar
💭
<And if you gaze long enough into an abyss, the abyss will gaze back into you/>

Rodrigo Cordeiro rodcordeiro

💭
<And if you gaze long enough into an abyss, the abyss will gaze back into you/>
View GitHub Profile
@mskelton
mskelton / set-package-manager.sh
Created August 29, 2023 02:08
Set the packageManager key in package.json to the latest version of the given package manager
#!/usr/bin/env bash
# Ensure there is a manifest file
if [[ ! -f package.json ]]; then
echo "error: no manifest file found"
exit 1
fi
# Get the repo name for the given package manager
if [[ $1 == 'npm' ]]; then
@Luisgustavom1
Luisgustavom1 / ComposeProviders.tsx
Last active November 24, 2025 03:00
Compose React Providers to avoid too much chaining
import React from 'react'
interface IComposeProvidersProps {
with: Array<React.ElementType>
children: React.ReactNode
}
export const ComposeProviders = ({
with: Providers,
children,
@mrk-han
mrk-han / expo-azure.yml
Last active October 11, 2025 15:24
Simple Guide for a Build and Testing Pipeline with Expo and EAS from Azure Devops CICD (Managed Workflow)
# https://aka.ms/yaml
trigger:
branches:
include:
- main
- releases/*
- hotfix/*
pr:
autoCancel: true
apiVersion: v1
kind: ConfigMap
metadata:
name: redis-config
data:
redis.conf: |
# Redis configuration file example.
#
# Note that in order to read the configuration file, Redis must be
# started with the file path as first argument:
@compwiz32
compwiz32 / Prompt.ps1
Last active November 19, 2022 05:26
Script for article - "Customize your PowerShell commnd prompt"
function prompt {
#Assign Windows Title Text
$host.ui.RawUI.WindowTitle = "Current Folder: $pwd"
#Configure current user, current folder and date outputs
$CmdPromptCurrentFolder = Split-Path -Path $pwd -Leaf
$CmdPromptUser = [Security.Principal.WindowsIdentity]::GetCurrent();
$Date = Get-Date -Format 'dddd hh:mm:ss tt'
@ALiangLiang
ALiangLiang / vpn.ps1
Last active June 4, 2025 10:04
Create and connect VPN with powershell script
# Author: ALiangLiang <me@aliangliang.top>
# Replace VPN_NAME, ADDRESS and ACCOUNT first!!
# Ref: https://docs.microsoft.com/en-us/powershell/module/vpnclient/add-vpnconnection?view=win10-ps
$VPN_NAME = 'VPN'
$ADDRESS = 'vpn.example.com'
$ACCOUNT = 'user1'
function Connect {
@Erikdegroot89
Erikdegroot89 / list-updates.sh
Created February 1, 2019 10:16
Get all commits since last tag
git log $(git describe --tags --abbrev=0)..HEAD --no-merges --oneline > new-in-this-release.log
# Needs a Powerline Font (ie, DejaVu Sans Mono for Powerline).
# Needs Posh-Git module.
Import-Module Posh-Git
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
if ($currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { $Script:IsAdmin = $true }
function prompt {
if (((Get-Item $pwd).parent.parent.name)) {
@diaraujo13
diaraujo13 / json
Created April 25, 2018 02:49
GLPI API - Basic calls to tickets endpoint
{
"variables": [],
"info": {
"name": "GLPI API",
"_postman_id": "93d36159-3fa9-bed0-ff15-ad4cc5cc6abb",
"description": "",
"schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
},
"item": [
{
@gghughunishvili
gghughunishvili / example.md
Last active October 16, 2025 21:52 — forked from sdnts/example.md
Postman pm.sendRequest example

To send a request via the sandbox, you can use pm.sendRequest.

pm.test("Status code is 200", function () {
    pm.sendRequest('https://postman-echo.com/get', function (err, res) {
        pm.expect(err).to.not.be.ok;
        pm.expect(res).to.have.property('code', 200);
        pm.expect(res).to.have.property('status', 'OK');
    });
});