What is Hackers' Pub?

Hackers' Pub is a place for software engineers to share their knowledge and experience with each other. It's also an ActivityPub-enabled social network, so you can follow your favorite hackers in the fediverse and get their latest posts in your feed.

0
0
0
0

I'm currently working on a script to automate posting replies to topics in a NodeBB forum using the NodeBB API. I have successfully managed to log in and retrieve user data, but I'm encountering issues when trying to post a reply to a topic.

Here is the relevant part of my code:

Python
import requests
import json

class NodeBBAPI:
    def __init__(self):
        self.session = requests.Session()
        self.session.verify = False
        self.base_url = "https://example.com"
        self.headers = {
            'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36',
            'Accept': 'application/json',
            'Content-Type': 'application/json',
            'X-Requested-With': 'XMLHttpRequest',
            'Origin': 'https://example.com',
            'Referer': 'https://example.com/'
        }
        self.user_data = None

    def login(self, username, password):
        try:
            config_response = self.session.get(
                f"{self.base_url}/api/config",
                headers=self.headers
            )
            
            login_data = {
                "username": username,
                "password": password
            }
            
            login_response = self.session.post(
                f"{self.base_url}/api/v3/utilities/login",
                json=login_data,
                headers=self.headers
            )
            
            if login_response.ok:
                response_data = login_response.json()
                if response_data.get('status', {}).get('code') == 'ok':
                    self.user_data = response_data.get('response', {})
                    self.headers['Authorization'] = f"Bearer {self.user_data.get('token')}"
                    return True

            return False
            
        except Exception as e:
            print(f"Login error: {str(e)}")
            return False

    def post_reply(self, topic_id, content):
        if not self.user_data:
            print("You must log in first!")
            return None

        try:
            reply_data = {
                "content": content,
                "_uid": self.user_data.get("uid")
            }
            
            response = self.session.post(
                f"{self.base_url}/api/v3/topics/{topic_id}/reply",
                json=reply_data,
                headers=self.headers
            )
            
            return response.ok
                
        except Exception as e:
            print(f"Error posting reply: {str(e)}")
            return False

def main():
    username = 'your_username'
    password = 'your_password'
    topic_id = 123  # Replace with the actual topic ID
    content = 'This is an automated reply.'

    nodebb = NodeBBAPI()
    
    if nodebb.login(username, password):
        if nodebb.post_reply(topic_id, content):
            print("Reply posted successfully!")
        else:
            print("Failed to post reply.")
    else:
        print("Login failed.")

if __name__ == "__main__":
    main()

I am able to log in successfully and get the user data, but when I attempt to post a reply, I receive a 403 Forbidden error.

Here are some details from the response:

Status Code: 403
Response: "Forbidden"
I have verified that my user account has write permissions and I can post replies manually via the web interface.

Can anyone provide insights into what might be going wrong or if there are any specific headers or parameters that I need to include in the request?

Thank you in advance for your help!

0

https://www.frontend.moe/posts/naver-2025-coding-test/ 팀네이버 코딩 테스트 후기를 개인 블로그에 올려두었습니다. 꾸준히 일할 수 있는 지속 가능한 소프트웨어 엔지니어로서의 삶을 지켜내고자 반성글을 쓰게 되었습니다(...)

0

https://www.frontend.moe/posts/naver-2025-coding-test/ 팀네이버 코딩 테스트 후기를 개인 블로그에 올려두었습니다. 꾸준히 일할 수 있는 지속 가능한 소프트웨어 엔지니어로서의 삶을 지켜내고자 반성글을 쓰게 되었습니다(...)

0
0

The Fourier Transform is a mathematical operation that transforms a function of time (or space) into a function of frequency. It decomposes a complex signal into its constituent sinusoidal components, each with a specific frequency, amplitude, and phase. This is particularly useful in many fields, such as signal processing, physics, and engineering, because it allows for analysing the frequency characteristics of signals. The Fourier Transform provides a bridge between the time and frequency domains, enabling the analysis and manipulation of signals in more intuitive and computationally efficient ways. The result of applying a Fourier Transform is often represented as a spectrum, showing how much of each frequency is present in the original signal.

\[\Large\boxed{\boxed{\widehat{f}(\xi) = \int_{-\infty}^{\infty} f(x)\ e^{-i 2\pi \xi x}\,\mathrm dx, \quad \forall\xi \in \mathbb{R}.}}\]

Inverse Fourier Transform:
\[\Large\boxed{\boxed{ f(x) = \int_{-\infty}^{\infty} \widehat f(\xi)\ e^{i 2 \pi \xi x}\,\mathrm d\xi,\quad \forall x \in \mathbb R.}}\]

The equation allows us to listen to mp3s today. Digital Music Couldn’t Exist Without the Fourier Transform: bit.ly/22kbNfi

0

 午前中にブースト(共有)した下記2つの投稿、南港ストリートピアノについて。

 関西のことなのかどうかもよく知らないまま、上手な演奏だけをタダで誰かにさせようなんていう発想がいかにも維新的だなあと思ったら、この南港ストリートピアノというのは大阪のことで、この施設を運営するアジア太平洋トレードセンター株式会社(ATC)というのは大阪市が99.99%を出資する会社だった。やっぱりなという感想しか出てこない。

mastodon.irohanano.nl/@iroha_n

(7) 主要な借入先
借入先 借入額
大阪市 15,620百万円
日本政策投資銀行 4,572百万円
株式会社三菱UFJ銀行 4,046百万円
株式会社みずほ銀行 2,055百万円
株式会社三井住友銀行 1,361百万円
株式会社りそな銀行 1,021百万円

2. 会社の株式に関する事項(平成30年3月31日現在)
(1) 発行可能株式総数普通株式4,000,470,000株
(2)発行済株式総数
普通株式 4,000,442,225株(うち自己株式73,540株)
(3)株主数
47名
(4)大株主(発行済株式の総数の10分の1以上の数の株式を保有する株主)

株主名 大阪市
持株数 4,000,150,000株
出資比率 99.99%

3. 会社役員に関する事項
(1)取締役及び監査役の状況(平成30年3月31日現在)

地位 氏名 担当、他の法人等の代表状況及び重要な兼務状況
代表取締役社長 堀田則雄
専務取締役 東信作
取締役 和田彩 大阪市経済戦略局 立地交流推進部長
取締役 田井公浩 関西電力株式会社理事 お客さま本部副本部長
取締役 岩﨑貞治 大阪瓦斯株式会社 大阪地区支配人
取締役 國定浩 大阪学院大学 特任教授
常勤監查役 土居俊彦 株式会社エーリック監査役
監査役 高坂佳郁子 色川法律事務所パートナ
※取締役のうち和田彩、田井公浩、岩﨑貞治、國定浩一の4氏は社外取締役です。

当該事業年度中の取締役、監査役の異動は次のとおりであります。
1. 就任
平成29年4月25日開催の臨時株主総会において、東信作が取締役に選任され、同日開催の取締役会で専務取締役に就任いたしました。
平成29年6月23日開催の定時株主総会において、田井公浩、岩崎真治が取締役に、土居俊彦、高坂佳郁子が監査役に選任いたしました。
2. 退任
平成29年6月23日開催の定時株主総会をもって、取締役の鯉淵正、監査役の中川純典は辞任し、監査役の石橋伸子は任期満了で退任いたしました。
南港ストリートピアノ @nankostreetpf
大阪市住之江区の大型商業施設ATCシーサイドテラス内にあるストリートピアノ♪漆赤のオトナなペイントを施しています。欧州のアンティークなシャンデリアの下で演奏をお楽しみください♪土日祝14~
18時限定!!
◎ 大阪市住之江区南港北2-1-10ATCビルO's北館2階
@atc-co.com
回 2022年9月からXを利用しています
5フォロー中 276 フォロワー

南港ストリートピアノ @nankostreetpf・19時間
#南港ストリートピアノからのお願い
こんな掲示はしたくなかった、、というのが正直な気持ちです、、
「練習は家でしてください」
こんなこと書かなきゃいけないなんて想定外でした。
間違うのはしょーがないんです、、生身だから心でも、人の練習聞かされる側はたまったもんじゃないんです。
ストリートピアノ演奏者の方へ
【お願いです】練習は家でしてください。
この南港ストリートピアノはフードコートの中にあります。つっかえてばかりの演奏に多くのクレームが入っており、このままだとこのピアノを撤収せざるを得ない状況です。
練習は家でしてください。練習を重ねてつっかえずに弾けるようになってから、ここで発表して頂けたら幸いです。
誰かに届いてこそ「音楽」です。手前よがりな演奏は「苦音」です。
0
0
0
0
0
0

Misskeyで投稿を引用すると、自動的に「RE: URL」がコンテンツに追加されますが、他のActivityPub実装(AkkomaやFedibird)とは異なり、この部分にCSSクラスがないため、カスタムCSSで非表示にできません。

この問題を解決するために、Misskeyの引用テキストに.quote-inlineクラスを追加する提案をしました。もし賛同していただけるなら、以下のイシューにスターやコメントをお願いします。

https://github.com/misskey-dev/misskey/issues/15698

When quoting posts in Misskey, “RE: URL” is automatically added to content, but unlike other ActivityPub implementations (Akkoma, Fedibird), this section lacks a CSS class, making it impossible to hide with custom CSS.

I've created an issue proposing to add a .quote-inline class to quoted text in Misskey. If you agree with this improvement, please consider starring or commenting on the issue:

https://github.com/misskey-dev/misskey/issues/15698

0

Does anybody on here know anybody who can help with Emergency Haitan Deportations?

Looking for Canada help, as in Canada immigration/refugee law, Canadian Haitian Community, etc.

Any help, much appreciated. It's a matter of life and death for some people in my extended family who (were) on American Visas.

Casting the net as wide as I can, talking to everybody.

0
0
0

As a book translator I spend my days working with texts. Also it means I have to deal with user-hostile file formats like docx. Because editors, designers...
My long-time friend was LibreOffice. I used it since version 5.something. It's a great alternative to Microsoft Office. But in other respects you have to put up with this huge bulky piece of legacy code that probably still has Sun engineers' souls trapped inside.
And I want to boast with my little personal victory. I have finally finished a book fully typed in and (for the glory of both editors) in Markdown format and later processed via to docx (with all required styles and formatting). I used LibreOffice only on the last stage to iron out some quirks and typos. It seems this workflow works.
Which means I don't have to use this huge and unhandy LibreOffice suite every day.
Now I want to figure out if I can use org format for my translations or should I stay with Markdown. Because it seems I like it here with Emacs.

0

If Elon does end up being forced to step down from Tesla, remember this:

1. They didn't ask him to step down after telling advertisers to go fuck themselves if they didn't want their products next to Twitter Nazis.

2. They didn't ask him to step down after doing a Nazi salute on live national TV.

3. They didn't ask him to step down after he put Nazi youth in charge of cutting veterans benefits, social security, Medicare, Medicaid, or USaid.

They could have.

But no. They're doing this because the stock prices are spiralling. And the only reason that's happening is because of the Tesla protests.

Keep going. Become ungovernable. It's working.

0
0
0
0


ケーキタイムって聞いて何が出てくるかな〜って箱開けたら!!
まさかのサプライズお誕生日
🎂祝いしてくれました​:yotimu_panic:​​:yotimu_panic:
人生で24人もの人にお祝いされたの初めてで幸せになっちゃいました
:yotimu_panic:
@pinkkiji桃尻:momoji_gaming:ももじ@3/29_Jケット7_A23 ももじちゃんの絵ってすぐわかったよ〜!!
すっごいかわいいうちの子をありがとうねぇー!
:deep_arigatou_hukakukansya:​​:yotimu_panic:​もうなんでもしてお礼しちゃいます!!​:yotimu_panic:
@nishimachi3西野マチ:tetrapod1:@3/23(日):misskey:東京オフ主催 @Nadir_RLNadir/なでぃる:blobcamera::meowcomfycamera: マチちゃんとなでぃるちゃんも一生の記憶に残るお誕生日祝い考えてくれてありがとう〜ー!!​:meowhuggies:​てれてれのてれてます​:yotimu_panic:

0
0

AT Protocol이 이 지점에서 ActivityPub과 차별화되는 걸까? ATProto를 사용하면 DID를 통해 A서비스에 있는 계정과 B서비스에 있는 계정이 둘 다 내 계정임을 증명할 수 있고, 나에 대한 데이터는 서비스와 상관없이 모두 PDS에 저장해두는...? 이 방식이 ActivityPub보다 더 탈중앙화된 것처럼 보이기도 하네.

0
0
0
0
0

_svcj_ipaddrs option for FreeBSD 15 service jails: github.com/freebsd/freebsd-src

it works like this:

inetd_enable=YES
inetd_svcj=YES
inetd_svcj_options="net_basic"
inetd_svcj_ipaddrs="::1 127.0.0.1 2001:db8::1"

a few obvious use-cases:

* fix services that don't let you configure bind address

* fix services that can only bind to a single IP address, meaning they can't bind to both an IPv4 and IPv6 address

* easily set outgoing IP address on a per-service basis

0
0
0
0
0
0
0
0
0
0

트친님이 들었던 정신과 의사 레전드 쌉소리 "남자를 만나서 결혼을 하고 자녀를 가지면 우울증이 나을지도 모른다." ? 저 미친 의사 망언 때문에 마음고생 하고 계시길래 너무 놀라서 냅다 1:1 디엠으로 찾아가서 퀴어프렌들리 정신과 & 상담센터 목록 정리해둔거 링크 드렸었음 지금 생각해도 어이가 없네 뭐 그딴 개자식이 다 있담?? 성소수자알권리보장지원 노스웨스트호 트위터 링크 : x.com/northwest_db...

RE: https://bsky.app/profile/did:plc:efe44gdkbuuyqgisirmzdkk3/post/3lkz22ebfzk2g

0

什么时候可以自信地说,我在哪儿都能过得很好呢?

把幸福和结果脱钩之后,突然生活中可以有大量大量的东西都能让人感觉到幸福。当然本来结果就只能让你感觉到松一口气,而不是真地开心,甚至哪怕是有关自己喜欢的东西的结果,也只是短暂地开心一下罢了。你真正开心的时刻明明从来都来自过程,追求结果的只是资本和社会罢了。体验,就是过程啊。

让自己持久幸福的能力就是能随时把令人幸福的事物增加到自己的生活中,晒太阳,小猫咪,大片的郁金香,甜甜的有机黄瓜,新交的朋友,松软的棉被,拉伸,一点一点地构建值得过的生活。这大概能说明为什么幸福是一种能力,不大在于外界。

偶尔会被拽到讨厌的事物中去,不过没关系,再走回来就行了。然后每次都尽量把那些东西排除出我的仓鼠球外面。在整个世界似乎都在崩坏的时候,这种能力似乎格外重要,不如让我来试试看这个理论能不能用吧 :ablobcathappypaws:

0
0
0
0
0
0
0
0
0
0
0
0

流れでなんとなくモーネスキンを聴いたりしており、そういえばeurovisionいつ?と思ったら明日?うおおおおおおお。
ということで改めて2024のwinnerであるNemoさん聴いてる
youtube.com/watch?v=CO_qJf-nW0k

0
0
0
0

높은 목표를 가진 개발자라도 결국엔 아주 사소한 동기로 움직이는거 같다.

나같은 경우엔, 완벽한 프로그래밍 언어를 만드는 것이 목표인데(가능한지는 차치하고), 완벽하다는건 나말고 다른 누군가가 같은 문제 의식을 가진다면 똑같이 그곳에 다다를 거란걸 의미한다. 그 프로그래밍 언어의 설계에서 내 마음대로 결정할수 있는 부분은 없을 것이다. 설계에서 최적의 선택지만을 택해야 완벽할테니까 말이다. 그때가선 그 선택들이 너무 자명해서, 내겐 처음부터 선택의 여지가 없었다고 느낄것이다.

그럼에도 내가 결정할 수 있을 부분이 있기는한데, 그 언어의 이름에 뜬금없이 우리집 강아지 이름을 붙인다던가 하는 것이다. 이게 그 사소한 동기다.

0

높은 목표를 가진 개발자라도 결국엔 아주 사소한 동기로 움직이는거 같다.

나같은 경우엔, 완벽한 프로그래밍 언어를 만드는 것이 목표인데(가능한지는 차치하고), 완벽하다는건 나말고 다른 누군가가 같은 문제 의식을 가진다면 똑같이 그곳에 다다를 거란걸 의미한다. 그 프로그래밍 언어의 설계에서 내 마음대로 결정할수 있는 부분은 없을 것이다. 설계에서 최적의 선택지만을 택해야 완벽할테니까 말이다. 그때가선 그 선택들이 너무 자명해서, 내겐 처음부터 선택의 여지가 없었다고 느낄것이다.

그럼에도 내가 결정할 수 있을 부분이 있기는한데, 그 언어의 이름에 뜬금없이 우리집 강아지 이름을 붙인다던가 하는 것이다. 이게 그 사소한 동기다.

0

安寧(안녕)하세요, 저는 서울에 살고 있는 30() 後半(후반) 오픈 소스 소프트웨어 엔지니어이며, 自由(자유)·오픈 소스 소프트웨어와 聯合宇宙(연합우주)(fediverse)의 熱烈(열렬)支持者(지지자)입니다.

저는 TypeScript() ActivityPub 서버 프레임워크인 @fedifyFedify: ActivityPub server framework 프로젝트와 싱글 유저() ActivityPub 마이크로블로그인 @holloHollo :hollo: 프로젝트와 ActivityPub 봇 프레임워크인 @botkitBotKit by Fedify :botkit: 프로젝트의 製作者(제작자)이기도 합니다.

저는 ()아시아 言語(언어)(이른바 )와 유니코드에도 關心(관심)이 많습니다. 聯合宇宙(연합우주)에서는 國漢文混用體(국한문 혼용체)를 쓰고 있어요! 제게 韓國語(한국어)英語(영어), 日本語(일본어)로 말을 걸어주세요. (아니면, 漢文(한문)으로도!)

こんにちは、私はソウルに住んでいる30代後半のオープンソースソフトウェアエンジニアで、自由・オープンソースソフトウェアとフェディバースの熱烈な支持者です。名前は洪 民憙ホン・ミンヒです。

私はTypeScript用のActivityPubサーバーフレームワークである「@fedifyFedify: ActivityPub server framework」と、ActivityPubをサポートする1人用マイクロブログである 「@holloHollo :hollo:」と、ActivityPubのボットを作成する為のシンプルなフレームワークである「@botkitBotKit by Fedify :botkit:」の作者でもあります。

私は東アジア言語(いわゆるCJK)とUnicodeにも興味が多いです。日本語、英語、韓国語で話しかけてください。(または、漢文でも!)

0

Hello, I'm an open source software engineer in my late 30s living in , , and an avid advocate of and the .

I'm the creator of @fedifyFedify: ActivityPub server framework, an server framework in , @holloHollo :hollo:, an ActivityPub-enabled microblogging software for single users, and @botkitBotKit by Fedify :botkit:, a simple ActivityPub bot framework.

I'm also very interested in East Asian languages (so-called ) and . Feel free to talk to me in , (), or (), or even in Literary Chinese (, )!

安寧(안녕)하세요, 저는 서울에 살고 있는 30() 後半(후반) 오픈 소스 소프트웨어 엔지니어이며, 自由(자유)·오픈 소스 소프트웨어와 聯合宇宙(연합우주)(fediverse)의 熱烈(열렬)支持者(지지자)입니다.

저는 TypeScript() ActivityPub 서버 프레임워크인 @fedifyFedify: ActivityPub server framework 프로젝트와 싱글 유저() ActivityPub 마이크로블로그인 @holloHollo :hollo: 프로젝트와 ActivityPub 봇 프레임워크인 @botkitBotKit by Fedify :botkit: 프로젝트의 製作者(제작자)이기도 합니다.

저는 ()아시아 言語(언어)(이른바 )와 유니코드에도 關心(관심)이 많습니다. 聯合宇宙(연합우주)에서는 國漢文混用體(국한문 혼용체)를 쓰고 있어요! 제게 韓國語(한국어)英語(영어), 日本語(일본어)로 말을 걸어주세요. (아니면, 漢文(한문)으로도!)

1