Skip to content

Instantly share code, notes, and snippets.

View ubuntupunk's full-sized avatar
:octocat:
making coffee

DavDev Yes ubuntupunk

:octocat:
making coffee
View GitHub Profile
@roib20
roib20 / apt-repo-playbook.yaml
Last active May 1, 2024 16:45
Example usages of the new `deb822_repository` Ansible module
---
- hosts: localhost
connection: local
gather_facts: true
tasks:
- name: Add APT repositories
when: ansible_os_family == 'Debian'
become: true
block:
@noraj
noraj / gulp-cjs-to-esm.md
Last active April 28, 2024 08:42
Moving gulpfile from CommonJS (CJS) to ECMAScript Modules (ESM)

Moving gulpfile from CommonJS (CJS) to ECMAScript Modules (ESM)

Context

del v7.0.0 moved to pure ESM (no dual support), which forced me to move my gulpfile to ESM to be able to continue to use del.

The author sindresorhus maintains a lot of npm packages and does not want to provides an upgrade guide for each package so he provided a generic guide. But this guide is a bit vague because it's generic and not helping for gulp, hence this guide.

Guide

@svenk
svenk / README.md
Created September 16, 2021 10:38
Mediawiki backup to Git Repository

Automatic backup to some SECURE git space for a MediaWiki

This is carried out with two shell scripts: One responsible for gathering the wiki contents in various formats as single files, and one responsible for uploading to a git repository.

Directory structures

@ubuntupunk
ubuntupunk / YahooFinance.js
Created July 5, 2021 12:02 — forked from mikaelz/YahooFinance.js
Google script to fetch stock quote data from Yahoo Finance
function YahooFinance(ticker) {
var ticker = ticker || "GOOG";
ticker = encodeURI(ticker);
var response = UrlFetchApp.fetch("https://query2.finance.yahoo.com/v7/finance/options/" + ticker);
var chain = JSON.parse(response.getContentText());
return parseFloat(chain.optionChain.result[0].quote.regularMarketPrice);
}
@vipul79321
vipul79321 / us_market_yahoo_finance_ticker_to_stock.json
Created June 30, 2021 19:45
A dictionary of yahoo finance ticker symbol to ticker name for US Market
{
"A": "Agilent Technologies, Inc.",
"AA": "Alcoa Corporation",
"AABB": "Asia Broadband, Inc.",
"AAC": "Ares Acquisition Corporation",
"AACAF": "AAC Technologies Holdings Inc.",
"AACAY": "AAC Technologies Holdings Inc.",
"AACG": "ATA Creativity Global",
"AACQ": "Origin Materials Inc",
"AAGFF": "Aftermath Silver Ltd.",
@mikaelz
mikaelz / YahooFinance.js
Created April 20, 2020 06:34
Google script to fetch stock quote data from Yahoo Finance
function YahooFinance(ticker) {
var ticker = ticker || "GOOG";
ticker = encodeURI(ticker);
var response = UrlFetchApp.fetch("https://query2.finance.yahoo.com/v7/finance/options/" + ticker);
var chain = JSON.parse(response.getContentText());
return parseFloat(chain.optionChain.result[0].quote.regularMarketPrice);
}
@clifinger
clifinger / config.plist
Created November 9, 2019 06:02
Z390M Gaming, Last bios, Catalina, Clover boot (sleep working !)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>ACPI</key>
<dict>
<key>AutoMerge</key>
<true/>
<key>DSDT</key>
@pcgeek86
pcgeek86 / install-balena-cli.sh
Last active October 17, 2021 22:16
Install Balena CLI on Debian / Ubuntu
# Trevor Sullivan <trevor@trevorsullivan.net>
export VERSION='v9.12.0'
export FILENAME="balena-cli-$VERSION-linux-x64"
export URL="https://github.com/balena-io/balena-cli/releases/download/$VERSION/$FILENAME.zip"
sudo apt update
sudo apt install httpie unzip --yes
cd $HOME
@akhdaniel
akhdaniel / Nginx Monitoring Plugin
Created January 17, 2019 22:29
Nginx Monitoring Plugin
sudo apt-get install libwww-perl
Edit nginx.conf, bagian http
Test curl http://localhost/nginx_status
server {
listen 127.0.0.1;
server_name localhost;
location /nginx_status {
@Blaradox
Blaradox / brightnessControl.sh
Created September 23, 2018 03:47
Notifications for brightness and volume, using dunstify
#!/usr/bin/env bash
# You can call this script like this:
# $ ./brightnessControl.sh up
# $ ./brightnessControl.sh down
# Script inspired by these wonderful people:
# https://github.com/dastorm/volume-notification-dunst/blob/master/volume.sh
# https://gist.github.com/sebastiencs/5d7227f388d93374cebdf72e783fbd6a