Skip to content

Instantly share code, notes, and snippets.

View petethepig's full-sized avatar
🔥
Building Pyroscope

Dmitry Filimonov petethepig

🔥
Building Pyroscope
View GitHub Profile
@petethepig
petethepig / Pyroscope_CLA
Last active January 2, 2021 04:19 — forked from CLAassistant/SAP_CLA
Pyroscope Individual Contributor License Agreement
### Pyroscope Individual Contributor License Agreement
Thank you for your interest in contributing to open source software projects (“Projects”) made available by Pyroscope or its affiliates (“Pyroscope”). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to Pyroscope in respect of any of the Projects (collectively “Contributions”). If you have any questions respecting this Agreement, please contact opensource@pyroscope.io.
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
**Copyright License.** You hereby grant, and agree to grant, to Pyroscope a non-exclusive,
# I ran cloc (https://github.com/AlDanial/cloc) on each directory of mal (https://github.com/kanaka/mal)
# These are the results:
----------------------------------------------------------------------
dir-name top-language files blank comment code
----------------------------------------------------------------------
objpascal Pascal 19 706 951 6275
ada Ada 28 1984 380 5892
elm Elm 19 1625 226 5682
swift Swift 20 980 1519 5636
$ cloc .
1821 text files.
1765 unique files.
470 files ignored.
github.com/AlDanial/cloc v 1.74 T=15.81 s (85.8 files/s, 12774.4 lines/s)
--------------------------------------------------------------------------------
Language files blank comment code
--------------------------------------------------------------------------------
Visual Basic 38 1573 132 8103
@petethepig
petethepig / 0-screenshot.md
Last active August 7, 2023 05:40
Send AWS EC2 maintenance notification to Slack

Screenshot

// Photoshop Script to Create iPhone Icons from iTunesArtwork
//
// WARNING!!! In the rare case that there are name collisions, this script will
// overwrite (delete perminently) files in the same folder in which the selected
// iTunesArtwork file is located. Therefore, to be safe, before running the
// script, it's best to make sure the selected iTuensArtwork file is the only
// file in its containing folder.
//
// Copyright (c) 2010 Matt Di Pasquale
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com
@petethepig
petethepig / mfa-delete.rb
Created January 29, 2013 08:08 — forked from anonymous/mfa-delete.rb
A simple tool that will help you enable MFA Delete feature on your S3 bucket
#!/usr/bin/env ruby
require 'aws'
if ARGV.length < 5
print <<-EOF
Usage: mfa-delete.rb <bucket_name> <aws_id> <aws_secret> <mfa_serial> <mfa_token> <s3_endpoint>
<s3_endpoint> is optional
EOF
exit
end
#!/bin/bash
USER=root #mysql credentials
PASSWORD=***
BACKUP=/root/backups #temporary storage
CLOUD=/mnt/yandex.disk/backups
OLD=10
PREFIX=dfilimonov.com
DATE=`date '+%Y-%m-%d'`
@petethepig
petethepig / space_check.rb
Created September 15, 2012 13:33
Sending SMS every time the available disk space is less than 25%
#!/usr/local/bin/ruby
require 'net/http'
require 'sys/filesystem' # gem install sys-filesystem
api_id="api_id from sms.ru" # get one on sms.ru
phone_number="79111234567" # your phone number
stat = Sys::Filesystem.stat("/")
space = (stat.blocks_available.to_f / stat.blocks * 100).round