Movatterモバイル変換


[0]ホーム

URL:


Skip to content
Search Gists
Sign in Sign up

Instantly share code, notes, and snippets.

Discover gists

@reddragon
reddragon /libevent-demo.cpp
Last activeOctober 8, 2025 02:26
A demo for libevent usage
#include<iostream>
#include<cstdio>
#include<vector>
#include<event2/event.h>
#include<glog/logging.h>
#include<cassert>
#include<string>
#include<cstring>
#include<sys/socket.h>
#include<netinet/in.h>

The semantic tokens from lsp uses the@lsp.typemod.method.declaration highlight group for__init__ constructor ofclasses. Treesitter, in the other hand, applies the@constructor highlight group.

basedpyright-lsp

The@constructor highlight group is more meaningful, right?

@markasoftware
markasoftware /enterprise_token.rb
Last activeOctober 8, 2025 02:17
OpenProject Enterprise mode for free
############ If you are using DOCKER all-in-one image, create Dockerfile like: ################
############ FROM openproject/openproject:16 ################
############ COPY ./enterprise_token.rb app/models/enterprise_token.rb ################
############ If you are runing a manual installation: ################
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ If using some other set up (eg docker-compose), read the comments on ################
############ https://gist.github.com/markasoftware/f5b2e55a2c2e3abb1f9eefcdf0bfff45 ################
@eclecticc
eclecticc /logo.txt
Last activeOctober 8, 2025 02:14
Framework Logo in 24 lines of ASCII
RMMR RMMR
FRMWWWWWWMF FRMWWWWWWMRF
RMWWWWWWWWWWWWWMMWWWWWWWWWWWWWMR
MWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWR
MWWWWWWWWWWWWWMMMMMMWWWWWWWWWWWWWM
MWWWWWWWWMRF FRMWWWWWWWWM
WWWWWWMF RMWWWWWM
FMWWWWWF RWWWWWMF
FMWWWWWWM FMWWWWWMRF
FMWWWWWWWWM FWWWWWWWWWMF
@bbqtd
bbqtd /macos-tmux-256color.md
Last activeOctober 8, 2025 02:13
Installing tmux-256color for macOS
  • macOS 10.15.5
  • tmux 3.1b

macOS has ncurses version 5.7 which does not ship the terminfo description for tmux. There're two ways that can help you to solve this problem.

The Fast Blazing Solution

Instead oftmux-256color, usescreen-256color which comes with system. Place this command into~/.tmux.conf or~/.config/tmux/tmux.conf(for version 3.1 and later):

@x0nu11byt3
x0nu11byt3 /elf_format_cheatsheet.md
CreatedFebruary 27, 2021 05:26
ELF Format Cheatsheet

Introduction

Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.

ELF

Compilation

@liba2k
liba2k /ghidra.py
Last activeOctober 8, 2025 02:10
Script to run Ghidra from the command line including automatic analysis and lunching Ghidra for existing projects.
#!/usr/bin/env python3
importos
importsys
importclick
importsubprocess
importtempfile
importitertoolsasIT
importselect
fromtimeimportsleep
@jcmgray
jcmgray /oinsum.py
CreatedMay 30, 2020 07:15
oinsum - an einsum implementation for numpy object arrays
defoinsum(eq,*arrays):
"""A ``einsum`` implementation for ``numpy`` object arrays.
"""
importnumpyasnp
importfunctools
importoperator
lhs,output=eq.split('->')
inputs=lhs.split(',')
@jjnilton
jjnilton /mac-network-commands-cheat-sheet.md
Last activeOctober 8, 2025 02:03
Mac Network Commands Cheat Sheet

Disclaimer: I'm not the original author of this sheet, but can't recall where I found it.If you know the author, please let me know so I give the attribution.

The original author seems to be Charles Edge, here's theoriginal content, as pointed out by @percisely.

Note: Since this seems to be helpful to some people, I formatted it to improve readability of theoriginal. Also, note that this is from 2016, many things may have changed, and I don't use macOS anymore, so I probably can't help in case of questions, but maybe someone else can.

Mac Network Commands Cheat Sheet

After writing up the presentation for MacSysAdmin in Sweden, I decided to go ahead and throw these into a quick cheat sheet for anyone who’d like to have them all in one place. Good luck out there, and s

NewerOlder

[8]ページ先頭

©2009-2025 Movatter.jp