Skip to content

Instantly share code, notes, and snippets.

View b1ek's full-sized avatar
👋
Coding

blek! b1ek

👋
Coding
View GitHub Profile

Bittorrent uTorrent disable ads

Turn off ALL Ads/Featured Content/Bundle Crap in Utorrent/Bittorrent:

Options > Preferences > Advanced... Turn ALL settings to false:

  • bt.enable_pulse
  • distributed_share.enable
  • gui.show_notorrents_node
  • offers.left_rail_offer_enabled
@sphinxid
sphinxid / count_per_second_nginx_log.sh
Last active September 6, 2023 01:53
This bash script is to help count request per seconds (rps) of nginx access log. (method: tailing the streamed file logs)
#!/bin/bash
#
# sphinxid <firman.gautama@gmail.com>
#
# Example: ./count_per_second_nginx_log.sh /var/log/nginx/*.log
#
RAND_STR=`cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1`
INTERVAL=10 #seconds
@yidas
yidas / composer-install-vcs.md
Last active April 23, 2024 04:45
Composer install package via VCS such as GitLab (Private package requirement)

Composer install package via VCS such as GitLab

(Private package requirement)

1. Create composer.json:

{
    "repositories": [                                             
        {                                                         
 "type": "vcs", 
@Niakr1s
Niakr1s / cmake_windows_icon.txt
Created November 23, 2019 19:55
How to add icon to cmake app in windows
1. Put app.ico in directory.
2. Create app.rc in same directory with one line:
IDI_ICON1 ICON DISCARDABLE "app.ico"
3. Run command (Warning: it's app.o, not app.res, how it is mentioned in other manuals!)
windres app.rc -o app.o
4. add_executable(app
...
@JTBrinkmann
JTBrinkmann / destruct-alternatives.sh
Last active June 24, 2024 23:13
bash destructuring assignment for arrays
#!/bin/bash
## Alternative Versions
# only allows space separated variable name list
# example: destruct a b c = arr
destruct() {
for ((i=1;i < $#-1; ++i)) do
local value_adress="${!#}[$i-1]"
declare -g "${!i}=${!value_adress}"
done