This file contains hidden or 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
// checking bindings snippets | |
if (binding.hasVariable('superVariable')) { | |
// your code here | |
} | |
An easy solution to this is the following: | |
if (binding.variables.containsKey("bindingVar")) { | |
// do something | |
} | |
Or if you’d like to get a null value for an optional binding: |
This file contains hidden or 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
# Homebrew has done away with options in all of their core formulas | |
# discussion on this change here: https://github.com/Homebrew/homebrew-core/issues/31510 | |
# Instead, Use the last version of the homebrew forumla that still supported them. | |
# the formula is here: https://raw.githubusercontent.com/Homebrew/homebrew-core/90e6931235a333899bd2572353ca065bd5535452/Formula/ffmpeg.rb | |
# install it like this: | |
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/90e6931235a333899bd2572353ca065bd5535452/Formula/ffmpeg.rb \ | |
--with-aom \ | |
--with-chromaprint \ |
This file contains hidden or 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 python3 | |
import asyncio | |
import socket | |
async def handle_echo(reader, writer): | |
addr = writer.get_extra_info('peername') | |
while True: | |
data = await reader.read(4096) |
This file contains hidden or 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
sudo su | |
yum --enablerepo=extras install epel-release | |
yum -y install patch dkms kernel-devel perl | |
yum update | |
#Required for kernel num 5: | |
yum --enablerepo=elrepo-kernel -y install kernel-ml-devel | |
reboot |
This file contains hidden or 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
1) Install cloudflared using homebrew: | |
brew install cloudflare/cloudflare/cloudflared | |
2) Create /usr/local/etc/cloudflared/config.yaml, with the following content | |
proxy-dns: true | |
proxy-dns-upstream: | |
- https://1.1.1.1/dns-query | |
- https://1.0.0.1/dns-query |
This file contains hidden or 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 the SDK | |
import boto3 | |
import datetime | |
import os | |
rds = boto3.client('rds', region_name='us-east-1') | |
db_instance_identifier = "mysql-db" | |
log_base_path = "./log/" |
This file contains hidden or 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/expect | |
#"AS61119,AS60863,AS51286,AS49988,AS49797,AS47764,AS21051,AS206494,AS47764":"mailru,odnoklassniki", "AS47541,AS47542,AS28709":"vkontakte", "AS43247,AS207207,AS202611,AS13238":"yandex" | |
set timeout 60 | |
log_user 0 | |
spawn telnet route-server.he.net | |
foreach as {61119 60863 51286 49988 49797 47764 21051 206494 47764 47541 47542 28709 43247 207207 202611 13238 1} { | |
expect { | |
"route-server> " { |
This file contains hidden or 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
vi /etc/environment | |
add these lines... | |
LANG=en_US.utf-8 | |
LC_ALL=en_US.utf-8 |
This file contains hidden or 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
// Related to https://issues.jenkins-ci.org/browse/JENKINS-26481 | |
abcs = ['a', 'b', 'c'] | |
node('master') { | |
stage('Test 1: loop of echo statements') { | |
echo_all(abcs) | |
} | |
stage('Test 2: loop of sh commands') { |
NewerOlder