Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View qmacro's full-sized avatar

DJ Adams qmacro

View GitHub Profile
@huytd
huytd / wordle.md
Last active March 17, 2024 20:51
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@htammen
htammen / btp_accesstoken
Last active November 24, 2021 07:38
Retrieve an access token for a btp cf app
#!/bin/bash
# Get BTP OAuth access token
# Usage:
# btp_accesstoken <appname>
#
# Call this bash script with btp_accesstoken <appname> where appname is a name
# of your apps on btp.
# You can retrieve the list of apps with 'cf a'
# Login credentials are retrieved from bitwarden. You have to be logged into it already
# client_id, client_secret, oauth endpoint are retrieved from 'cf de <appname>'. You have to be looged into it as well.
@mwt
mwt / README.md
Last active March 10, 2024 09:40
Jekyll include for utterances

Jekyll include for utterances

This is an include to use utterances comments on any Jekyll static site. It is fully compatible with GitHub Pages.

Basic usage

Add utterances.html to your /_includes folder. Put the following include statement in the part of your layout/page/post/include that you want the comments to be in:

{% include utterances.html %}
@IObert
IObert / mta.yaml
Created January 23, 2020 12:12
Sample project descriptor which generates tiny mtar archives
_schema-version: 2.0.0
ID: bookshop
version: 1.0.0
parameters:
enable-parallel-deployments: true
modules:
- name: bookshop-db
type: hdb
path: db
@fnky
fnky / ANSI.md
Last active April 23, 2024 06:10
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@cassiozen
cassiozen / pixelbook-dev-setup.md
Last active October 22, 2023 12:06 — forked from denolfe/pixelbook-linux-setup.md
Notes on setting up Pixelbook for development

Pixelbook Setup

Change your channel

Some of the features mentioned in this document only work on the beta or Dev channel. To change your channel:

  1. chrome://help in a browser window
  2. Click Detailed Build Information
  3. Change Channel
  4. Select Beta (Or Dev, if you're feeling adventurous)
@noromanba
noromanba / twitch-irc-with-weechat.mkd
Last active January 24, 2024 01:17
How to join Twitch IRC w/ WeeChat
@jasper07
jasper07 / proxy.js
Last active June 2, 2019 12:19
Simple Node reverse proxy for UI5 development
var express = require('express'),
httpProxy = require('http-proxy'),
proxy = new httpProxy.createProxyServer();
var routing = {
'sapui5': {
target: 'http://localhost:8001' //sdk
},
'apps': {
target: 'http://localhost:8002' //applications
@jcla1
jcla1 / solution.py
Created April 20, 2013 18:13
Solution to checkio.org ATM problem. Functional Python FTW!
import math
def total_cost(amount):
return int(math.ceil(amount + 0.5 + 0.01 * amount))
def reduce_balance(balance, amount):
if amount < balance:
balance -= total_cost(amount)
return balance
@qmacro
qmacro / gist:3999375
Created November 2, 2012 08:00
GoogleAppsScript ROT functions
var alphabet = 'abcdefghijklmnopqrstuvwxyz';
function rotText(text, n) {
var newText = "";
for (var i = 0, j = text.length; i < j; i++) {
newText += rot(text[i], n);
}
return newText;
}