Skip to content

Instantly share code, notes, and snippets.

View xnuk's full-sized avatar
🏳️‍🌈
pride

즈눅 xnuk

🏳️‍🌈
pride
View GitHub Profile
@pbzweihander
pbzweihander / enable_phonesim.sh
Created August 19, 2020 06:32
Enable phonesim to use bluetooth headset's mic (e.g. AirPods Pro)
#!/usr/bin/env bash
# Use i3-msg or something that can spawn to background
i3-msg exec "phonesim -p 12345 /usr/share/phonesim/default.xml"
sudo systemctl start ofono.service
dbus-send --print-reply --system --dest=org.ofono /phonesim org.ofono.Modem.SetProperty string:"Powered" variant:boolean:true
dbus-send --print-reply --system --dest=org.ofono /phonesim org.ofono.Modem.SetProperty string:"Online" variant:boolean:true
@ykon
ykon / raw_input.rs
Created May 6, 2019 13:27
RawInput in Rust
/*
[dependencies]
widestring = "0.4.0"
lazy_static = "1.3.0"
[dependencies.winapi]
version = "0.3.7"
features = ["winuser", "winbase", "libloaderapi", "hidusage"]
*/
@chalkpe
chalkpe / kt-egg.md
Last active February 4, 2019 18:01

KT 에그 간단 설명

모든 요청 기본값

  • POST http://192.168.1.1/cgi-bin/webmain.cgi
  • Content-Type: multipart/form-data

로그인 세션 얻기

요청

이름
@kentbrew
kentbrew / finding_twitter_user_id.md
Last active October 16, 2024 17:25
Finding Twitter User IDs

Finding Twitter User IDs

User accounts on Twitter are commonly identified by screen name, which may be changed by operators when they take over an account, or have been sitting on an old account for a long time and want to transition it into malicious use.

User IDs, however, are permanent. There are several services out there that will try to find them for you but it seems like a bad idea to me, since you're alerting them to the fact that there's something interesting about this account. There's also plenty of bad advice that uses many long-since-abandoned Twitter API endpoints.

As of this writing (2018-02-18) you can view source and search for /profile_banners/, which will show something like this:

.enhanced-mini-profile .mini-profile .profile-summary {
{
"rate_limit_context": {
"access_token": "*"
},
"resources": {
"profile_spotlight": {
"/profile_spotlight/show": {
"limit": 180,
"remaining": 180,
"reset": 1467248717
@queertypes
queertypes / Client.hs
Created March 20, 2015 15:28
Echo Client
{-# LANGUAGE OverloadedStrings #-}
module Client where
import Network.Socket hiding (recv)
import Network.Socket.ByteString
run :: IO ()
run = do
addrInfo <- getAddrInfo Nothing (Just "localhost") (Just "3000")
let addr = head addrInfo
@getify
getify / gist:7ae82fdc2e86bf66bcba
Last active March 27, 2022 19:50
List of ES6 books either out or in progress...
@rauschma
rauschma / proxies-es5.js
Last active November 2, 2020 23:16
ES6 proxies in ES5
//----- The ECMAScript 6 meta object protocol (MOP) implemented in ES5
// This is how getting a property is handled internally.
// Double underscore (__) implies internal operation.
Object.prototype.__Get__ = function (propKey, receiver) {
receiver = receiver || this;
var desc = this.__GetOwnProperty__(propKey);
if (desc === undefined) {
var parent = this.__GetPrototypeOf__();
if (parent === null) return undefined;
@conatus
conatus / ello.md
Last active April 13, 2023 19:32
Ello API

Ello API

This is a basic exploration of the Ello API. Completely unofficial, your mileage my vary, don't smash their servers as they are likely very busy.

Methods return HTML for their representation where appropriate which is a nice little pattern. Everything returns application/json.

Like this:

{
 "id": ,
@unstabler
unstabler / encode-all.sh
Last active March 24, 2017 09:25
ffserver streaming
#!/bin/sh
for file in *.avi
do
file_without_ext=$(echo "$file" | sed -e 's/\.avi//')
subtitle="$file_without_ext.smi"
outfile="$file_without_ext.ts"
if ! [ -f "$subtitle" ]
then
echo "자막 파일 $subtitle 이 존재하지 않습니다! 다음으로 넘어갑니다.." | tee -a encode.log
continue