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 | |
# Usage: ./set-brightness.sh 0.7 | |
# Adjust brightness on all connected monitors | |
# Check if brightness level is provided | |
if [ -z "$1" ]; then | |
echo "Usage: $0 <brightness-level>" | |
echo "Example: $0 0.7" | |
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
#!/bin/sh | |
for file in /proc/*/status ; do awk '/VmSwap|Name/{printf $2 " " $3}END{ print ""}' $file; done | sort -k 2 -n -r | less |

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
template <class T> void bitstr(const T& out) noexcept; | |
template <class T> int popcnt(const T& val) noexcept; | |
int main() | |
{ | |
// Uniform descriptors | |
// 0000 0000 (0 Transitions : Uniform) 0x0 | |
// 1110 0011 (2 Transitions : Uniform) 0xE3 | |
// 0101 0000 (4 Transitions : NonUniform) 0x50 |
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
void dump(PIX* pix) | |
{ | |
int_t w = pix->w; | |
int_t h = pix->h; | |
int_t wpl = pixGetWpl(pix); | |
l_uint32* data = pixGetData(pix); | |
l_uint32* line; | |
printf("\n"); |
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
typedef unsigned long int hash_t; | |
#include <iostream> | |
#include <bitset> | |
#include <iostream> | |
#include <bitset> | |
#include <climits> | |
#include "HashDistance.h" | |
int popcnt(const hash_t& val) noexcept |