Skip to content

Instantly share code, notes, and snippets.

@ekovac
ekovac / BookmarkAPI_en.md
Created Sep 23, 2020 — forked from stepney141/BookmarkAPI_en.md
WIP: Twitter Undocumented Endpoints for Bookmark
View BookmarkAPI_en.md

Twitter Undocumented Bookmark API (WIP)

I found out the endpoints for bookmark with Chrome Developer Tools: GET timeline/bookmark, POST bookmark/entries/remove, POST bookmark/entries/remove. The rate limits below are values returned by an official endpoint GET application/rate_limit_status.

This document is still a work in progress because I got stuck in GET timeline/bookmark. Please let me know if you find how to use it.

Notes

  • It is necessary that x-csrf-token in a request header and ct0 in a cookie are the same value. Twitter uses them to avoid CSRF attacks. I recommend that you extract the values from your browsers.
  • All of the endpoints requires OAuth2 Authorizations. Note that they refuse OAuth2 Bearer tokens obtained from POST oauth2/token.
  • You can easily reach the rate limit and get HTTP 429 Error (too many requests), so you should be careful about how many requests you send.
View keybase.md

Keybase proof

I hereby claim:

  • I am ekovac on github.
  • I am ekovac (https://keybase.io/ekovac) on keybase.
  • I have a public key ASB6wMhzYC390bpNItiU2c5mCiaLsqRpxe_plWrTfRkUPgo

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am pkovac on github.
  • I am ekovac (https://keybase.io/ekovac) on keybase.
  • I have a public key ASB6wMhzYC390bpNItiU2c5mCiaLsqRpxe_plWrTfRkUPgo

To claim this, I am signing this object:

@ekovac
ekovac / airlock.cs
Last active Aug 17, 2019
Airlock script for Space Engineers
View airlock.cs
public Program()
{
// The constructor, called only once every session and
// always before any other method is called. Use it to
// initialize your script.
//
// The constructor is optional and can be removed if not
// needed.
View cloudbuild.yaml
steps:
- name: "gcr.io/cloud-builders/gcloud"
args: ["app", "deploy"]
timeout: "1600s"
@ekovac
ekovac / fix-windows-backup.ps1
Created Jan 5, 2018
Rename files in a backup generated by the Windows 10 backup utility to their original name.
View fix-windows-backup.ps1
Foreach ($item in Get-ChildItem -File -Recurse)
{
$newName = $item.Name -replace '\(\d{4}_\d{2}_\d{2} \d{2}_\d{2}_\d{2} UTC\)',''
Rename-Item -Path $item.PSPath -NewName $newName
}
@ekovac
ekovac / Tree.tsx
Created Mar 4, 2016
An elegant tree view
View Tree.tsx
import * as React from "react";
import VBox from "../react-ui/VBox";
export interface ITreeState {
selectedItems: Array<IWeaveTreeNode>;
openItems: Array<IWeaveTreeNode>;
}
import IWeaveTreeNode = weavejs.api.data.IWeaveTreeNode;
View gist:56d07fdd25b23a393078
### Keybase proof
I hereby claim:
* I am pkovac on github.
* I am pkovac (https://keybase.io/pkovac) on keybase.
* I have a public key whose fingerprint is 1963 DAC0 D083 52E7 DD68 E582 A66C 4E57 DAAA 0D9E
To claim this, I am signing this object:
@ekovac
ekovac / pgm2escp9.c
Created Aug 22, 2012
Tool to create an ESC/P custom character stream from a monochrome image to enable graphical printing on some printers which fail to do so using the CUPS ESC/P driver.
View pgm2escp9.c
#include <stdio.h>
#include <stdlib.h>
#include <pam.h>
#define CELL_HEIGHT 8
#define CELL_WIDTH 11
typedef struct
{
char* c;
int width;
int height;
@ekovac
ekovac / gist:3137790
Created Jul 18, 2012
Snippet for AwesomeRC to "Toggle" a process
View gist:3137790
toggle_pids = {}
function toggle_process(cmd)
pid = toggle_pids[cmd]
if (pid == nil) then
pid = awful.util.spawn(cmd)
else
awful.util.spawn("kill " .. pid)
pid = nil
end
You can’t perform that action at this time.