home.social

Search

1000 results for “jq”

  1. I want to applaud @[email protected] and @[email protected] for appearing on stage together and expressing a desire to cooperate. As I've said for a long time, #Bluesky and #Mastodon, #ActivityPub and #ATProtocol should not be fighting each other...

  2. #TuneTuesday (May 12)

    Phil Collins, whether solo or with his band Genesis, has produced a lot really good songs. (His work on Tarzan was excellent!) But what I really like about his song “Take Me Home” is that it doesn’t sound like it’s from the 1980s especially with its breathy vocals in the chorus (with Sting and Peter Gabriel singing backup!).

    youtu.be/jq1oyB1CNa4

    #earworms #music #songs #PhilCollins

  3. CW: As an administrator of several Matrix servers, every now and then I have to decommission one. You can't just power the server down, throw it away and be done with it, so let me show you how it's done.
    As an administrator of several Matrix servers, every now and then I have to decommission one.

    You can't just power the server down, throw it away and be done with it (really, you can't!). You'll have to remove all users first, and give those removals some time to propagate over the Matrix universe. After that, you can power the server down and junk it.

    A handful of users can be removed manually with, for example, Synapse-Admin. But today I have a server with several thousands of users... I've had problems with Carpal Tunnel Syndrome before, so there's no way I'm going to spend several hours moving my mouse the same directions over and over again for hours.

    Prepare

    I use the Matrix API and curl (thanks for that, @daniel:// stenberg://) to do this the easy way. Well, some of you may scratch your heads when I call this the easy way... 😏

    All the commands I show here, are run on the Matrix server itself. You can run them anywhere, but then you'll have to replace "localhost" for the URL of your server, of course.

    First of all, you'll need an access token for an account with admin rights. If you happen to have a session open, you can simply copy it from there. If you don't, here's how to get one.

    curl -s -X POST http://localhost:8008/_matrix/client/r0/login \
    -H "Content-Type: application/json" \
    -d '{ \
    "type": "m.login.password", \
    "user": "@administrator:EXAMPLE.COM" , \
    "password": "SECRET ADMIN PASSWORD" \
    }' | \
    jq '.access_token'


    This will give you a string like "syt_YWRtaW5pc3RyYXRvcg_dQCZlHWPsGluyHLYyhnH_2aI2ln", provided you used the right username, password and URL. I'll use "xxxx" for better visibility.

    Check the number of users

    Let's verify our access by checking how many users we're talking about.

    curl -s -X GET http://localhost:8008/_synapse/admin/v2/users?limit=1000000&deactivated=true \
    -H "Authorization: Bearer xxxx" | \
    jq '.users[] | .name' | \
    wc -l


    The limit of 1 million is sort of necessary: you can't say "every user", but if you don't provide a limit, you'll only get the first 100.

    Now that you know how many users there are in your database, let's remove them all.

    Remove all users

    You may be thinking, "if I remove all users, I also remove my admin account, which could complicate things". Good thinking, I ran into that exact problem, because I did my previous user removals with Synapse-Admin (you know, selecting a handful users, clicking "remove", waiting... rince and repeat) and that wouldn't remove my admin account.

    But when you use the API directly, you abandon the guard rails and you can actually hurt yourself. I was lucky enough to find that there was still one other admin account after I had removed mine, so I hijacked that one to finished the job. If yours is (was!) the only active admin account, you have a problem...

    With this code we list all users MINUS OUR ADMIN ACCOUNT and pass them to the next command, that actually deletes them:
    curl -s -X GET http://localhost:8008/_synapse/admin/v2/limit=1000000 \
    -H "Authorization: Bearer xxxx" | \
    jq '.users[] | .name' | \
    sed '/@administrator:EXAMPLE.COM/d' | \
    xargs -I % \
    curl -s -X POST -H "Authorization: Bearer xxxx" \
    -H "Content-Type: application/json" \
    -d '{ "erase": true }' \
    http://localhost:8008/_synapse/admin/v1/deactivate/% | \
    tee removal.log | \
    wc -l


    This will take a looong time, and that's why I have the command write its output to "removal.log", so you can check what's happening.

    Every successful removal prints this result:
    {"id_server_unbind_result":"success"}
    So once no new entries like that are being added to the log file, you're done and should be left with only your admin account(s).

    Give it a few days for the rest of the Matrix universe to pick these removals up, say a week, and then you can junk your server.

    #Matrix #curl #API
  4. CW: As an administrator of several Matrix servers, every now and then I have to decommission one. You can't just power the server down, throw it away and be done with it, so let me show you how it's done.
    As an administrator of several Matrix servers, every now and then I have to decommission one.

    You can't just power the server down, throw it away and be done with it (really, you can't!). You'll have to remove all users first, and give those removals some time to propagate over the Matrix universe. After that, you can power the server down and junk it.

    A handful of users can be removed manually with, for example, Synapse-Admin. But today I have a server with several thousands of users... I've had problems with Carpal Tunnel Syndrome before, so there's no way I'm going to spend several hours moving my mouse the same directions over and over again for hours.

    Prepare

    I use the Matrix API and curl (thanks for that, @daniel:// stenberg://) to do this the easy way. Well, some of you may scratch your heads when I call this the easy way... 😏

    All the commands I show here, are run on the Matrix server itself. You can run them anywhere, but then you'll have to replace "localhost" for the URL of your server, of course.

    First of all, you'll need an access token for an account with admin rights. If you happen to have a session open, you can simply copy it from there. If you don't, here's how to get one.

    curl -s -X POST http://localhost:8008/_matrix/client/r0/login \
    -H "Content-Type: application/json" \
    -d '{ \
    "type": "m.login.password", \
    "user": "@administrator:EXAMPLE.COM" , \
    "password": "SECRET ADMIN PASSWORD" \
    }' | \
    jq '.access_token'


    This will give you a string like "syt_YWRtaW5pc3RyYXRvcg_dQCZlHWPsGluyHLYyhnH_2aI2ln", provided you used the right username, password and URL. I'll use "xxxx" for better visibility.

    Check the number of users

    Let's verify our access by checking how many users we're talking about.

    curl -s -X GET http://localhost:8008/_synapse/admin/v2/users?limit=1000000&deactivated=true \
    -H "Authorization: Bearer xxxx" | \
    jq '.users[] | .name' | \
    wc -l


    The limit of 1 million is sort of necessary: you can't say "every user", but if you don't provide a limit, you'll only get the first 100.

    Now that you know how many users there are in your database, let's remove them all.

    Remove all users

    You may be thinking, "if I remove all users, I also remove my admin account, which could complicate things". Good thinking, I ran into that exact problem, because I did my previous user removals with Synapse-Admin (you know, selecting a handful users, clicking "remove", waiting... rince and repeat) and that wouldn't remove my admin account.

    But when you use the API directly, you abandon the guard rails and you can actually hurt yourself. I was lucky enough to find that there was still one other admin account after I had removed mine, so I hijacked that one to finished the job. If yours is (was!) the only active admin account, you have a problem...

    With this code we list all users MINUS OUR ADMIN ACCOUNT and pass them to the next command, that actually deletes them:
    curl -s -X GET http://localhost:8008/_synapse/admin/v2/limit=1000000 \
    -H "Authorization: Bearer xxxx" | \
    jq '.users[] | .name' | \
    sed '/@administrator:EXAMPLE.COM/d' | \
    xargs -I % \
    curl -s -X POST -H "Authorization: Bearer xxxx" \
    -H "Content-Type: application/json" \
    -d '{ "erase": true }' \
    http://localhost:8008/_synapse/admin/v1/deactivate/% | \
    tee removal.log | \
    wc -l


    This will take a looong time, and that's why I have the command write its output to "removal.log", so you can check what's happening.

    Every successful removal prints this result:
    {"id_server_unbind_result":"success"}
    So once no new entries like that are being added to the log file, you're done and should be left with only your admin account(s).

    Give it a few days for the rest of the Matrix universe to pick these removals up, say a week, and then you can junk your server.

    #Matrix #curl #API
  5. CW: As an administrator of several Matrix servers, every now and then I have to decommission one. You can't just power the server down, throw it away and be done with it, so let me show you how it's done.
    As an administrator of several Matrix servers, every now and then I have to decommission one.

    You can't just power the server down, throw it away and be done with it (really, you can't!). You'll have to remove all users first, and give those removals some time to propagate over the Matrix universe. After that, you can power the server down and junk it.

    A handful of users can be removed manually with, for example, Synapse-Admin. But today I have a server with several thousands of users... I've had problems with Carpal Tunnel Syndrome before, so there's no way I'm going to spend several hours moving my mouse the same directions over and over again for hours.

    Prepare

    I use the Matrix API and curl (thanks for that, @daniel:// stenberg://) to do this the easy way. Well, some of you may scratch your heads when I call this the easy way... 😏

    All the commands I show here, are run on the Matrix server itself. You can run them anywhere, but then you'll have to replace "localhost" for the URL of your server, of course.

    First of all, you'll need an access token for an account with admin rights. If you happen to have a session open, you can simply copy it from there. If you don't, here's how to get one.

    curl -s -X POST http://localhost:8008/_matrix/client/r0/login \
    -H "Content-Type: application/json" \
    -d '{ \
    "type": "m.login.password", \
    "user": "@administrator:EXAMPLE.COM" , \
    "password": "SECRET ADMIN PASSWORD" \
    }' | \
    jq '.access_token'


    This will give you a string like "syt_YWRtaW5pc3RyYXRvcg_dQCZlHWPsGluyHLYyhnH_2aI2ln", provided you used the right username, password and URL. I'll use "xxxx" for better visibility.

    Check the number of users

    Let's verify our access by checking how many users we're talking about.

    curl -s -X GET http://localhost:8008/_synapse/admin/v2/users?limit=1000000&deactivated=true \
    -H "Authorization: Bearer xxxx" | \
    jq '.users[] | .name' | \
    wc -l


    The limit of 1 million is sort of necessary: you can't say "every user", but if you don't provide a limit, you'll only get the first 100.

    Now that you know how many users there are in your database, let's remove them all.

    Remove all users

    You may be thinking, "if I remove all users, I also remove my admin account, which could complicate things". Good thinking, I ran into that exact problem, because I did my previous user removals with Synapse-Admin (you know, selecting a handful users, clicking "remove", waiting... rince and repeat) and that wouldn't remove my admin account.

    But when you use the API directly, you abandon the guard rails and you can actually hurt yourself. I was lucky enough to find that there was still one other admin account after I had removed mine, so I hijacked that one to finished the job. If yours is (was!) the only active admin account, you have a problem...

    With this code we list all users MINUS OUR ADMIN ACCOUNT and pass them to the next command, that actually deletes them:
    curl -s -X GET http://localhost:8008/_synapse/admin/v2/limit=1000000 \
    -H "Authorization: Bearer xxxx" | \
    jq '.users[] | .name' | \
    sed '/@administrator:EXAMPLE.COM/d' | \
    xargs -I % \
    curl -s -X POST -H "Authorization: Bearer xxxx" \
    -H "Content-Type: application/json" \
    -d '{ "erase": true }' \
    http://localhost:8008/_synapse/admin/v1/deactivate/% | \
    tee removal.log | \
    wc -l


    This will take a looong time, and that's why I have the command write its output to "removal.log", so you can check what's happening.

    Every successful removal prints this result:
    {"id_server_unbind_result":"success"}
    So once no new entries like that are being added to the log file, you're done and should be left with only your admin account(s).

    Give it a few days for the rest of the Matrix universe to pick these removals up, say a week, and then you can junk your server.

    #Matrix #curl #API
  6. CW: As an administrator of several Matrix servers, every now and then I have to decommission one. You can't just power the server down, throw it away and be done with it, so let me show you how it's done.
    As an administrator of several Matrix servers, every now and then I have to decommission one.

    You can't just power the server down, throw it away and be done with it (really, you can't!). You'll have to remove all users first, and give those removals some time to propagate over the Matrix universe. After that, you can power the server down and junk it.

    A handful of users can be removed manually with, for example, Synapse-Admin. But today I have a server with several thousands of users... I've had problems with Carpal Tunnel Syndrome before, so there's no way I'm going to spend several hours moving my mouse the same directions over and over again for hours.

    Prepare

    I use the Matrix API and curl (thanks for that, @daniel:// stenberg://) to do this the easy way. Well, some of you may scratch your heads when I call this the easy way... 😏

    All the commands I show here, are run on the Matrix server itself. You can run them anywhere, but then you'll have to replace "localhost" for the URL of your server, of course.

    First of all, you'll need an access token for an account with admin rights. If you happen to have a session open, you can simply copy it from there. If you don't, here's how to get one.

    curl -s -X POST http://localhost:8008/_matrix/client/r0/login \
    -H "Content-Type: application/json" \
    -d '{ \
    "type": "m.login.password", \
    "user": "@administrator:EXAMPLE.COM" , \
    "password": "SECRET ADMIN PASSWORD" \
    }' | \
    jq '.access_token'


    This will give you a string like "syt_YWRtaW5pc3RyYXRvcg_dQCZlHWPsGluyHLYyhnH_2aI2ln", provided you used the right username, password and URL. I'll use "xxxx" for better visibility.

    Check the number of users

    Let's verify our access by checking how many users we're talking about.

    curl -s -X GET http://localhost:8008/_synapse/admin/v2/users?limit=1000000&deactivated=true \
    -H "Authorization: Bearer xxxx" | \
    jq '.users[] | .name' | \
    wc -l


    The limit of 1 million is sort of necessary: you can't say "every user", but if you don't provide a limit, you'll only get the first 100.

    Now that you know how many users there are in your database, let's remove them all.

    Remove all users

    You may be thinking, "if I remove all users, I also remove my admin account, which could complicate things". Good thinking, I ran into that exact problem, because I did my previous user removals with Synapse-Admin (you know, selecting a handful users, clicking "remove", waiting... rince and repeat) and that wouldn't remove my admin account.

    But when you use the API directly, you abandon the guard rails and you can actually hurt yourself. I was lucky enough to find that there was still one other admin account after I had removed mine, so I hijacked that one to finished the job. If yours is (was!) the only active admin account, you have a problem...

    With this code we list all users MINUS OUR ADMIN ACCOUNT and pass them to the next command, that actually deletes them:
    curl -s -X GET http://localhost:8008/_synapse/admin/v2/limit=1000000 \
    -H "Authorization: Bearer xxxx" | \
    jq '.users[] | .name' | \
    sed '/@administrator:EXAMPLE.COM/d' | \
    xargs -I % \
    curl -s -X POST -H "Authorization: Bearer xxxx" \
    -H "Content-Type: application/json" \
    -d '{ "erase": true }' \
    http://localhost:8008/_synapse/admin/v1/deactivate/% | \
    tee removal.log | \
    wc -l


    This will take a looong time, and that's why I have the command write its output to "removal.log", so you can check what's happening.

    Every successful removal prints this result:
    {"id_server_unbind_result":"success"}
    So once no new entries like that are being added to the log file, you're done and should be left with only your admin account(s).

    Give it a few days for the rest of the Matrix universe to pick these removals up, say a week, and then you can junk your server.

    #Matrix #curl #API
  7. CW: As an administrator of several Matrix servers, every now and then I have to decommission one. You can't just power the server down, throw it away and be done with it, so let me show you how it's done.
    As an administrator of several Matrix servers, every now and then I have to decommission one.

    You can't just power the server down, throw it away and be done with it (really, you can't!). You'll have to remove all users first, and give those removals some time to propagate over the Matrix universe. After that, you can power the server down and junk it.

    A handful of users can be removed manually with, for example, Synapse-Admin. But today I have a server with several thousands of users... I've had problems with Carpal Tunnel Syndrome before, so there's no way I'm going to spend several hours moving my mouse the same directions over and over again for hours.

    Prepare

    I use the Matrix API and curl (thanks for that, @daniel:// stenberg://) to do this the easy way. Well, some of you may scratch your heads when I call this the easy way... 😏

    All the commands I show here, are run on the Matrix server itself. You can run them anywhere, but then you'll have to replace "localhost" for the URL of your server, of course.

    First of all, you'll need an access token for an account with admin rights. If you happen to have a session open, you can simply copy it from there. If you don't, here's how to get one.

    curl -s -X POST http://localhost:8008/_matrix/client/r0/login \
    -H "Content-Type: application/json" \
    -d '{ \
    "type": "m.login.password", \
    "user": "@administrator:EXAMPLE.COM" , \
    "password": "SECRET ADMIN PASSWORD" \
    }' \
    | jq '.access_token'


    This will give you a string like "syt_YWRtaW5pc3RyYXRvcg_dQCZlHWPsGluyHLYyhnH_2aI2ln", provided you used the right username, password and URL. I'll use "xxxx" for better visibility.

    Check the number of users

    Let's verify our access by checking how many users we're talking about.

    curl -s -X GET http://localhost:8008/_synapse/admin/v2/users?limit=1000000&deactivated=true \
    -H "Authorization: Bearer xxxx" \
    | jq '.users[] | .name' \
    | wc -l


    The limit of 1 million is sort of necessary: you can't say "every user", but if you don't provide a limit, you'll only get the first 100.

    Now that you know how many users there are in your database, let's remove them all.

    Remove all users

    You may be thinking, "if I remove all users, I also remove my admin account, which could complicate things". Good thinking, but no: Matrix won't remove your admin account. This means you'll have to manually leave all rooms you've joined with that account. The same goes for all other admin accounts. THIS IS IMPORTANT!

    We'll now remove all users, by first listing them all and passing the output of that command to the next, which does the actual removing.

    curl -s -X GET http://localhost:8008/_synapse/admin/v2/limit=1000000 \
    -H "Authorization: Bearer xxxx" \
    | jq '.users[] | .name' \
    | xargs -I % \
    curl -s -X POST -H "Authorization: Bearer xxxx" \
    -H "Content-Type: application/json" \
    -d '{ "erase": true }' \
    http://localhost:8008/_synapse/admin/v1/deactivate/% \
    | tee removal.log \
    | wc -l


    This will take a looong time, and that's why I have the command write its output to "removal.log", so you can check what's happening.

    Every successful removal prints this result:
    {"id_server_unbind_result":"success"}
    So once no new entries like that are being added to the log file, you're done and should be left with only your admin account(s).

    Give it a few days for the rest of the Matrix universe to pick these removals up, say a week, and then you can junk your server.

    #Matrix #curl #API
  8. One of my kids has been playing #minecraft with me on the regular for several months. We play creative on a server I set up on his computer, and survival on my long time public server.

    He's been watching a handful of (insufferable) minecraft YouTubers and got it in his head that he has to play #skyblock and #oneblock. I've been resistant until today.

    So I set up a Bentobox instance with all the game modes knowing he'd love them, and it turns out, oneblock is really fun. :awesomeface:

  9. via css-tricks...
    You Might Not Need…JavaScript?
    Remember You Might Not Need jQuery? Pavel Laptev’s The Great CSS Expansion has a similar vibe, noting CSS alternatives to JavaScript libraries (and JavaScript in general) that are smaller and more performant.

    #css #js #frontend #ui

    blog.gitbutler.com/the-great-c

  10. #tersoftware de linha de comando

    #jq - formatação e bonitificação de texto em formato JSON
    #bat - um #cat com asas :)
    #ncdu - interface em ncurses pro #du, muito útil pra encontrar (e apagar) diretórios e arquivos gigantes no disco
    #ranger - navegador de arquivos com atalhos do vim
    #z - acessa pastas frequentemente utilizadas diretamente
    #fzf - backend de fuzzy search compatível com todos os sabores de shells e vim.
    #fd - um #find mais intuitivo
    #rg - um #grep mais intuitivo, com mais funcionalidades (e mais rápido)

  11. Kappa CULTR 2026 wrapped up at Bolgatty Palace, Kochi with global and Indian artists, European-style food experiences, and a first-of-its-kind arcade gaming zone, drawing thousands for three days of music, culture and immersive festival energy. english.mathrubhumi.com/movies #KappaCULTR #MusicFestival #Food #Gaming #ArcadeGames

  12. APIs only succeed when clients can trust them.
    With Quarkus you can test everything:
    - Example-based flows with RestAssured
    - Contract safety nets with Pact
    - Randomized edge cases with jqwik

    the-main-thread.com/p/quarkus-

    #Java #Quarkus #Testing #APIs #Pact

  13. 【BTCレポート】(00:21)
    🪙 現在: ¥12,621,420
    📉 前回比: -202,088円 (-1.58%)
    🔼 高値: ¥12,842,039
    🔽 安値: ¥12,621,420
    😨 Fear&Greed: 42 (恐怖)
    #BTC #Bitcoin #仮想通貨 t.co/jQewErVYhb

  14. It's #Friday. Time to dress for success in a tuxedo t-shirt.

    I have done it before with others, but seeing these two queens in this custom design of mine, I had to share it.

    If interested, the custom design code is MO-0SKW-PJJM-JQ0X.

    Tag me if you wear it on your island!

    #ACNH #AnimalCrossing #VideoGames #Nintendo #NintendoSwitch #ACNHScreenshots #ACNHCommunity #あつもり #あつ森 #CozyGames #CozyGamer #CozyGaming #ACNHDesign #ACNHCustomDesign #ACNHJudy #ACNHShino

  15. #MoundMonday, let's make it trend #archaeologists.
    Built over about seven millennia, #Sambaqui #ShellMounds found on the Brazilian coast range up to 70m high and 500m wide.
    Photo is Garopaba Sambaqui -28.62547 -48.8929, largest shell mound in Santa Catarina area, about 700,00 cubic meters - nearly equal to Monks Mound.
    commons.wikimedia.org/wiki/Fil
    See bibliography here: Sambaquis from the Southern Brazilian Coast ...
    researchgate.net/publication/3
    #Archaeology #Brazil #Mounds #MoundBuilding

  16. Can we make #MoundMonday a thing? What's your favorite mound? How do you rate #mounds, significance, size, age, type, earthen, stone, geometric?
    Here's a #deskpicture, #Observatory Mound, #Newark #Earthworks, #Ohio, 2560 x 1440 pixel illustration from Squier and Davis.
    40.05114 -82.45014 In #GoogleEarth turn on Layers > Photos (View > Sidebar) to check out shared #photography.
    Turn on Layers > Gallery > Google Earth Community and my #GPS #placemarks appear at many mound and earthworks sites.