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 ruby | |
| require 'easy_audio' | |
| require 'open3' | |
| # Configuration | |
| TARGET = "google.com" | |
| BASE_FREQUENCY = 1200.0 # Hz for High latency | |
| MIN_FREQUENCY = 200.0 # Hz for low latency | |
| SCALE = 0.001 # Adjust this for more/less sensitivity | |
| UPDATE_INTERVAL = 0.25 # Fast update interval for smooth transitions |
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
| # example private key | |
| private_key = ARGV[0] | |
| # -------------------------- | |
| # Secp256k1 Curve Parameters | |
| # -------------------------- | |
| # y^2 = x^3 + ax + b | |
| $a = 0 | |
| $b = 7 # using global variables for convenience |
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 ruby | |
| top_level = `git rev-parse --show-toplevel`.chomp | |
| file_paths = `git status --porcelain | cut -c4- | grep spec.rb`.freeze | |
| @ruby_version = `ruby -v | cut -d" " -f2 | cut -c-5`.freeze | |
| @project_ruby_version = `cat .ruby-version` | |
| verbose = ARGV.include?('-v') | |
| @unique_line = ARGV[1] if ARGV.include?('-l') |
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
| select pg_terminate_backend(pid) from pg_stat_activity where datname='db'; |
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
| RAILS_ENV=production bundle exec rails tmp:cache:clear assets:clobber assets:precompile && sudo service nginx restart && sudo service sidekiq restart |
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
| ls -1p | grep '/$' | sed 's/\/$//' | xargs -I {} bash -c "cd '{}' && pwd && echo $'\n' && bundle exec rake test" && echo $'\n' | xargs >> results.txt |
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
| /** | |
| * CircleCI Incoming Webhook Script for Rocket.Chat | |
| * @author <github.com/armandfardeau> | |
| */ | |
| class Script { | |
| process_incoming_request({ request }) { | |
| const statusMaps = { | |
| 'success': 'passed all tests ✅', | |
| 'no_tests': 'has no tests 🧐', |
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
| namespace :heroku do | |
| desc "Deploy a test version on heroku" | |
| task setup: :environment do | |
| if ENV["SECRET_KEY_BASE"].nil? | |
| puts "No SECRET_KEY_BASE found !" | |
| puts "export SECRET_KEY_BASE first : " | |
| puts "export SECRET_KEY_BASE=#{`bundle exe rake secret`}" | |
| exit 1 | |
| end |
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
| #!/bin/bash | |
| if [[ -z $1 ]];then | |
| branch=$(git rev-parse --abbrev-ref HEAD) | |
| branch_clean=${branch//_/-} | |
| branch_clean_no_digit=$(printf '%s' "$branch_clean" | sed 's/[0-9.]//g') | |
| app_name=$(printf '%s' "$branch_clean_no_digit" | sed 's/-//') | |
| if [ ${#app_name} -ge 30 ]; then | |
| echo "Branch name $app_name is too long, max is 30" | |
| exit 1 |
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
| git init --bare repo.git | |
| vim hooks/post-receive | |
| chmod ug+x hooks/post-receive |
NewerOlder