Skip to content

Instantly share code, notes, and snippets.

name: ci-cd pipeline deploy to prod
on:
push:
branches: [ feature/github-action ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Get Github action IP
@Xavier59
Xavier59 / privatekeysolana.js
Created December 28, 2021 14:49
Convert Solana private key from/to base58/uint8array
// exporting from a bs58 private key to an Uint8Array
// == from phantom private key to solana cli id.json key file
// npm install bs58 @solana/web3.js
const web3 = require("@solana/web3.js");
const bs58 = require('bs58');
let secretKey = bs58.decode("[base58 private key here]");
console.log(`[${web3.Keypair.fromSecretKey(secretKey).secretKey}]`);
// exporting back from Uint8Array to bs58 private key
@TiagoGouvea
TiagoGouvea / MigrationFresh.js
Created January 13, 2021 11:51
Adonis migration:fresh command with optional seed, that recreates the schema from scratch and seed data
'use strict';
const { Command } = require('@adonisjs/ace');
const Seeder = require('../../database/seeds/Seeder');
const ace = require('@adonisjs/ace');
class MigrationFresh extends Command {
/**
* Command signature
*/
<?php
// php cluter-quick-check --host <host> --port <port> [--auth password]
function panicAbort($str_msg) {
fprintf(STDERR, "Error: $str_msg\n\n");
$bt = debug_backtrace();
fprintf(STDERR, "--- BACKTRACE ---\n");
foreach (debug_backtrace() as $frame => $frame_info) {
@carnal0wnage
carnal0wnage / gist:cd5d5c714fd69691d80650887c3d5d75
Last active September 12, 2023 12:31
Google Sheet Code to grab current price from coin market cap
//from: https://github.com/rathergood/Crypto-Currency-Price/blob/master/ccprice
//returns price (or other info) of cryptocurrency from coinmarketcap api.
//takes two parameters, the name of the cryptocurrency and info that you want returned about the cc
//example: =ccprice("ethereum", "USD")
//example2 =ccprice("ethereum", "24h_volume_usd")
function ccprice(name, currency)
{
@nathanbirrell
nathanbirrell / cntlm-change-password.md
Last active November 16, 2021 08:49
Change CNTLM password on MacOS/Linux

Many corporate security policies require regular password changes, CNTLM makes these very easy.

First, get the hashes for the new password with:

cntlm -H

Copy and paste those hashes into your cntlm.conf file located at:

/usr/local/etc/cntlm.conf

@IBestuzhev
IBestuzhev / .pylint.py
Last active February 13, 2019 05:01
Pylint for remote projects
#!/usr/bin/env python3
import subprocess
import sys
path = sys.argv[-1]
if path.startswith('/path/to/my/local/source/folder/'):
path = path.replace('/path/to/my/local/source/folder/', '/app/folder/')
subprocess.run(['docker-compose', 'exec', '-T', 'cross', 'sh', '-c',
@alexathylane
alexathylane / iOS Universal Links Support Checklist.md
Last active August 8, 2024 09:35
iOS Universal Links Support Checklist
@cryzed
cryzed / fix-infinality.md
Last active March 20, 2025 13:16
A set of instructions on how to fix the harfbuzz + Infinality issue and restoring good-looking, Infinality-like font rendering.

Disclaimer: Please follow this guide being aware of the fact that I'm not an expert regarding the things outlined below, however I made my best attempt. A few people in IRC confirmed it worked for them and the results looked acceptable.

Attention: After following all the steps run gdk-pixbuf-query-loaders --update-cache as root, this prevents various gdk-related bugs that have been reported in the last few hours. Symptoms are varied, and for Cinnamon the DE fails to start entirely while for XFCE the icon theme seemingly can't be changed anymore etc.

Check the gist's comments for any further tips and instructions, especially if you are running into problems!

Screenshots

Results after following the guide as of 11.01.2017 13:08:

@kbariotis
kbariotis / main.yaml
Last active August 5, 2024 08:31
Ansible playbook for deploying a Node.js app to DigitalOcean
- name: DO
hosts: localhost
vars:
project_name: "PUT A NAME FOR YOUR PROJECT HERE"
do_token: "PUT YOUR DIGITAL OCEAN API KEY HERE ==> https://cloud.digitalocean.com/settings/api/tokens"
repository: "PUT YOUR REPOSITORY URL HERE"
tasks:
- name: LOCAL | Generate SSH key
shell: ssh-keygen -b 2048 -t rsa -f ~/.ssh/{{project_name}} -q -N ""