Skip to content

Instantly share code, notes, and snippets.

@RednibCoding
RednibCoding / Create a static library of a .c file.md
Last active May 12, 2024 07:25
Create a static library of a .c file for windows and linux

How do i create a static library file of my test.c with gcc?

You can create a static library .lib file using the GCC compiler by following these steps:

  1. Compile the source files into object files:
gcc -c test.c
@rvrsh3ll
rvrsh3ll / windows-keys.md
Created February 18, 2024 22:44
Windows Product Keys

NOTE

These are NOT product / license keys that are valid for Windows activation.
These keys only select the edition of Windows to install during setup, but they do not activate or license the installation.

Index

@whunter
whunter / adb_rotation.sh
Created February 9, 2016 18:13
android device display rotation via adb
# disable auto rotation
adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0
# force landscape
adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:1
# back to portrait
adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:0
# upside down
@tomoaki0705
tomoaki0705 / text.md
Last active May 12, 2024 07:20
「OpenCVの画像処理をGPU(CUDA)で高速化する」を読んでresizeをマルチコア対応するお話。

はじめに

OpenCVでの処理(リサイズなど)を、簡単にマルチコア化する方法をどなたかご存知でしたら教えて頂けないでしょうか? TBBを使ってスレッドを作る方法は色々見つかったのですが、単にcv::resize()をマルチコア動作で高速化させたいです。

TL;DR

  • Python バインディングが遅い
  • OpenCV の resize はずっと昔からマルチコア対応している
@Bilka2
Bilka2 / webhook.py
Last active May 12, 2024 07:17
Simple discord webhook with python
import requests # dependency
url = "<your url>" # webhook url, from here: https://i.imgur.com/f9XnAew.png
# for all params, see https://discordapp.com/developers/docs/resources/webhook#execute-webhook
data = {
"content" : "message content",
"username" : "custom username"
}
@sundowndev
sundowndev / GoogleDorking.md
Last active May 12, 2024 07:15
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
nvram set local_domain=$(nvram get lan_ipaddr)
nvram commit
@linuz90
linuz90 / Plausible Live Stats.scriptable
Last active May 12, 2024 07:09
iOS widget to display a live visitors count with Plausible analytics and Scriptable.
// Configuration
// You'll be able to set the domain when adding/editing the widget
// Make sure the stats are public on Plausible
const namespace = args.widgetParameter || "plausible.io"
const displayName = namespace.slice(0,namespace.lastIndexOf("."))
const accentColor = new Color("#CCCCCC")
// LineChart by https://kevinkub.de/
// Used as the widget background
class LineChart {
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 12, 2024 07:08
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

let themeVariables = {
'--w3m-z-index': 10000,
'--w3m-accent': '',
'--w3m-accent-color': '',
'--w3m-color-mix': '',
'--w3m-color-mix-strength': '',
'--w3m-border-radius-master': '',
'--w3m-font-size-master': '',
'--w3m-font-family': '',
'--w3m-overlay-backdrop-filter': 'blur(6px)'