This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# /etc/update-motd.d/99-disk-usage.sh | |
# Define colors for pretty output | |
YELLOW="\e[33m" | |
RESET="\e[0m" | |
# Get the disk usage information with header | |
DISK_USAGE_HEADER=$(df -h --output=source,fstype,size,used,avail,pcent,target | head -n 1) | |
DISK_USAGE=$(df -h --output=source,fstype,size,used,avail,pcent,target | grep -E '^/dev' | grep -E '/$|/mnt|/media|/data|/nvme0|/nvme1') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Input file containing links | |
inputFile="$1" | |
# Output state file | |
stateFile="state.csv" | |
# Function to handle script interruption | |
cleanup_and_exit() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:20.04 | |
WORKDIR /app | |
ARG DETECTED_BUILD | |
ENV BUILD=$DETECTED_BUILD | |
COPY . . | |
ENTRYPOINT [ "/bin/bash", "yeet.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import puppeteer from 'puppeteer'; | |
import fs from 'fs'; | |
import path from 'path'; | |
/* | |
// scroll and scrape links manually from album page | |
const rows = document.querySelectorAll('.photos_row[aria-label="Photo"] a'); | |
const hrefs = Array.from(rows).map(row => row.href); | |
hrefs.forEach((e) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Python: pytest", | |
"type": "python", | |
"request": "launch", | |
"module": "pytest", | |
"args": [ | |
"-v", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# if $1 does not match either check or install | |
if [[ $1 != "check" ]] && [[ $1 != "install" ]] && [[ $1 != "check-install" ]]; then | |
echo "Usage: package-management.sh [check|install|check-install]" | |
fi | |
if [[ $1 == "check" ]]; then | |
Rscript -e "devtools::check()" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Document from "next/document"; | |
import { ServerStyleSheet } from "styled-components"; | |
import { DocumentContext } from "next/document"; // Importing DocumentContext for TypeScript | |
export default class MyDocument extends Document { | |
static async getInitialProps(ctx: DocumentContext) { | |
const sheet = new ServerStyleSheet(); | |
const originalRenderPage = ctx.renderPage; | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# if $1 does not match either check or install | |
if [[ $1 != "check" ]] && [[ $1 != "install" ]] && [[ $1 != "check-install" ]]; then | |
echo "Usage: package-management.sh [check|install|check-install]" | |
fi | |
if [[ $1 == "check" ]]; then | |
Rscript -e "devtools::check()" | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------------------------------------------ | |
// Update elements of an object (key - value) by index number not name | |
const obj = { | |
student1: { | |
country: 'Chile', | |
name: 'Tom' | |
}, | |
student2: { | |
country: 'Argentina', | |
name: 'Julia' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"title" "gpl" "bioc_package" "manufacturer" "organism" "data_row_count" | |
"Illumina Sentrix Array Matrix (SAM) - GoldenGate Methylation Cancer Panel I" "GPL15380" "GGHumanMethCancerPanelv1" "Illumina" "Homo sapiens" 1536 | |
"Illumina HumanMethylation27 BeadChip (HumanMethylation27_270596_v.1.2)" "GPL8490" "IlluminaHumanMethylation27k" "Illumina, Inc." "Homo sapiens" 27578 | |
"Illumina HumanMethylation450 BeadChip (HumanMethylation450_15017482)" "GPL13534" "IlluminaHumanMethylation450k" "Illumina, Inc." "Homo sapiens" 485577 | |
"GE Healthcare/Amersham Biosciences CodeLink™ ADME Rat 16-Assay Bioarray" "GPL2898" "adme16cod" "GE Healthcare" "Rattus norvegicus" 1280 | |
"[AG] Affymetrix Arabidopsis Genome Array" "GPL71" "ag" "Affymetrix" "Arabidopsis thaliana" 8297 | |
"[ATH1-121501] Affymetrix Arabidopsis ATH1 Genome Array" "GPL198" "ath1121501" "Affymetrix" "Arabidopsis thaliana" 22810 | |
"[Bovine] Affymetrix Bovine Genome Array" "GPL2112" "bovine" "Affymetrix" "Bos taurus" 24128 | |
"[Canine] Affymetrix Canine Genome 1.0 Array" "GPL39 |
NewerOlder