Skip to content

Instantly share code, notes, and snippets.

View bugcy013's full-sized avatar
🪄
Focusing

Dhanasekaran Anbalagan bugcy013

🪄
Focusing
View GitHub Profile
# This file was autogenerated by the 'packer hcl2_upgrade' command. We
# recommend double checking that everything is correct before going forward. We
# also recommend treating this file as disposable. The HCL2 blocks in this
# file can be moved to other files. For example, the variable blocks could be
# moved to their own 'variables.pkr.hcl' file, etc. Those files need to be
# suffixed with '.pkr.hcl' to be visible to Packer. To use multiple files at
# once they also need to be in the same folder. 'packer inspect folder/'
# will describe to you what is in that folder.
# Avoid mixing go templating calls ( for example ```{{ upper(`string`) }}``` )
@bugcy013
bugcy013 / tf_variable_precedence.md
Created November 7, 2021 12:22
terraform_variable_precedence

tf_variable_precedence

@bugcy013
bugcy013 / SLA Error budget.csv
Created August 10, 2021 09:54
SLA Error budget
SLA Daily Weekly Monthly Quarterly Yearly
99.9999 % 0s 0s 2s 7s 31s
99.999 % 0s 6s 26s 1m 18s 5m 15s
99.99 % 8s 1m 0s 4m 22s 13m 8s 52m 35s
99.9 % 1m 26s 10m 4s 43m 49s 2h 11m 29s 8h 45m 56s
99.8 % 2m 52s 20m 9s 1h 27m 39s 4h 22m 58s 17h 31m 53s
99.7 % 4m 19s 30m 14s 2h 11m 29s 6h 34m 27s 1d 2h 17m 50s
99.6 % 5m 45s 40m 19s 2h 55m 18s 8h 45m 56s 1d 11h 3m 47s
99.5 % 7m 12s 50m 24s 3h 39m 8s 10h 57m 26s 1d 19h 49m 44s
99.4 % 8m 38s 1h 0m 28s 4h 22m 58s 13h 8m 55s 2d 4h 35m 41s
fakeroot dpkg-deb --build ${package_build_dir} ${package_name_deb}
# https://itectec.com/ubuntu/ubuntu-what-user-file-owner-to-use-when-creating-debian-packages/
# https://github.com/bugcy013/Building-deb-packages
YAML Anchor
&<anchor-name>
YAML Alias
*<anchor-name>
YAML Merge Key
<< : *<anchor-name>
@bugcy013
bugcy013 / request.py
Created April 27, 2021 05:24
curl command from python request
req = response.request
command = "curl -X {method} -H {headers} -d '{data}' '{uri}'"
method = req.method
uri = req.url
data = req.body
headers = ['"{0}: {1}"'.format(k, v) for k, v in req.headers.items()]
headers = " -H ".join(headers)
return command.format(method=method, headers=headers, data=data, uri=uri)
@bugcy013
bugcy013 / Jenkins Ans
Created March 7, 2021 10:24 — forked from manuelta/Jenkins Ans
Jenkins QQ
QUESTIONS FROM PREVIOUS EXAM
Refer : https://www.tutorialspoint.com/jenkins/index.htm (Questions are asked from this site)
1. Which of the folowing ways can be used to schedule a build in jenkins?
-After completion of other builds
-Can be scheduled to run at specific time
-By souce code management commits
2. To set up slaves/nodes in Jenkins which of the following feature is used?
Manage Nodes
$ wget -q -O- https://storage.googleapis.com/cloud-profiler/java/latest/profiler_java_agent.tar.gz | tar xzv
NOTICES
profiler_java_agent.so
libdataflow_profiler.jar
$ cat Test.java
public class Test {
private static void foo() {
while (true) {}
}
def keys_exists(element, *keys):
if not isinstance(element, dict):
raise AttributeError('keys_exists() expects dict as first argument.')
if len(keys) == 0:
raise AttributeError('keys_exists() expects at least two arguments, one given.')
_element = element
for key in keys:
try:
_element = _element[key]
from time import time, sleep
from random import randrange
from multiprocessing import Pool, cpu_count
numbers = range(1, 100)
sleep_sec = randrange(1, 2)
return_r = []