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 | |
# This script clones all repos in a GitHub org | |
# It requires the GH CLI: https://cli.github.com | |
# It can be re-run to collect new repos and pull the latest changes | |
set -euo pipefail | |
USAGE="Usage: gh-clone-org <user|org>" |
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
# Get-DirStats.ps1 | |
# Written by Bill Stewart ([email protected]) | |
#requires -version 2 | |
# PowerShell wrapper script for the SysInternals du.exe command: | |
# https://docs.microsoft.com/en-us/sysinternals/downloads/du | |
# Why? Object output for sorting, filtering, calculating totals, etc. | |
# | |
# Version history: |
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 | |
# | |
# Script to change underscan/overscan value of a monitor on OS-X. | |
# © 2016-2019 Konstantin Gredeskoul, distributed under the MIT License. | |
# | |
#——————————————————————————————————————————————————————————————————————————————————————————— | |
# EXCEPT AS REPRESENTED IN THIS AGREEMENT, ALL WORK PRODUCT BY DEVELOPER IS PROVIDED "AS IS". | |
# OTHER THAN AS PROVIDED IN THIS AGREEMENT, DEVELOPER MAKES NO OTHER WARRANTIES, EXPRESS OR | |
# IMPLIED, AND HEREBY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING ANY WARRANTY OF | |
# MERCHANTABILITY AND WARRANTY OF FITNESS FOR A PARTICULAR PURPOSE. |
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 -eu | |
OPENSSL_VER=1.1.0g | |
mkdir openssl | |
cd openssl | |
wget https://www.openssl.org/source/openssl-${OPENSSL_VER}.tar.gz | |
tar xf openssl-${OPENSSL_VER}.tar.gz | |
cd openssl-${OPENSSL_VER} | |
./config zlib shared no-ssl3 |
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
function base64url(source) { | |
// Encode in classical base64 | |
encodedSource = CryptoJS.enc.Base64.stringify(source); | |
// Remove padding equal characters | |
encodedSource = encodedSource.replace(/=+$/, ''); | |
// Replace characters according to base64url specifications | |
encodedSource = encodedSource.replace(/\+/g, '-'); | |
encodedSource = encodedSource.replace(/\//g, '_'); |
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
Ping all AWS EC2 IPs from http://ec2-reachability.amazonaws.com/ |
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
<div style="font-family: sans-serif;"> | |
<? var data = valid(); ?> | |
<form id="form" name="form"> | |
<? if(Object.prototype.toString.call(data) === '[object Array]') { ?> | |
<? for (var i = 0; i < data.length; i++) { ?> | |
<? for (var j = 0; j < data[i].length; j++) { ?> | |
<input type="checkbox" id="ch<?= '' + i + j ?>" name="ch<?= '' + i + j ?>" value="<?= data[i][j] ?>"><?= data[i][j] ?><br> | |
<? } ?> | |
<? } ?> | |
<? } else { ?> |
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
Magento 1.x: | |
Mage::getStoreConfig('carriers/shipper/active') | |
Magento 2.x: | |
protected $scopeConfig; | |
public function __construct( | |
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig |
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
### ElasticSearch version | |
if [ -z "$1" ]; then | |
echo "" | |
echo " Please specify the Elasticsearch version you want to install!" | |
echo "" | |
echo " $ $0 1.7.1" | |
echo "" | |
exit 1 | |
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
#!/bin/sh | |
#Check the Drive Space Used by Cached Files | |
du -sh /var/cache/apt/archives | |
#Clean all the log file | |
#for logs in `find /var/log -type f`; do > $logs; done | |
logs=`find /var/log -type f` | |
for i in $logs |
NewerOlder