Skip to content

Instantly share code, notes, and snippets.

View dharFr's full-sized avatar

Olivier Audard dharFr

View GitHub Profile
@dharFr
dharFr / delete-likes.js
Created September 2, 2023 00:07
Delete Tweets, RT & Likes from your Twitter/X account, from the browser console
/**
* 1. Go to "Likes" section of your profile (e.g. https://twitter.com/<your_twix_handle>/likes)
* 2. Open browser Console (Cmd + Option + I on Mac, F12 otherwise?)
* 3. Copy/Paste the script and press enter to run it.
*
* At some point, depending on the number of items you need to process, you might see the following error in the console:
* > "the server responded with a status of 429"
* That's TwiX rate limiting. Reload the page, wait a few minutes/hours before trying again, and you should be fine.
* Inspired from https://stackoverflow.com/a/72515907
*/
@dharFr
dharFr / pre-commit
Created March 26, 2017 23:24
Shellcheck pre-commit hook
#!/bin/sh
#
# This pre-commit hook run `shellcheck` against your code when you go to commit.
# See: http://www.shellcheck.net/
#
# To use this script copy it to .git/hooks/pre-commit and make it executable.
# Work out what to diff against, really HEAD will work for any established repository.
if git rev-parse --verify HEAD >/dev/null 2>&1
then
@dharFr
dharFr / README.md
Last active March 26, 2017 23:25
Open JIRA from the terminal

Setup

  • Copy/Paste the function defined in jira.sh in you .bash_profile or .bashrc
  • Export JIRA_ROOT variable in your environemnt (most likely in your .bash_profile/.bashrc as well) : export JIRA_ROOT='https://jira.yourdomain.com/'

Usage

jira [issue]
@dharFr
dharFr / keybase.md
Last active August 29, 2015 14:22
keybase.md

Keybase proof

I hereby claim:

  • I am dharfr on github.
  • I am oad (https://keybase.io/oad) on keybase.
  • I have a public key whose fingerprint is 562F CA1A 515F D1B7 D0B8 2EA9 9967 66E6 24A9 4F77

To claim this, I am signing this object:

@dharFr
dharFr / HowToSetupASimpleHttpsServer.md
Last active January 4, 2016 17:19
Quikly setup a local HTTPS server for dev/test purpose

1- Generate a self-signed SSL certificate using openssl

1.1- Generate a key file

> openssl genrsa -out key.pem 1024

1.2- Create a certificate request (CSR) with that key

@dharFr
dharFr / keyboard-events-on-tv.md
Created October 29, 2013 09:00
Testing keyboard (aka remote) events received in a few TV browsers.

Here is the results of a few tests I ran on various "TV browsers" environments.

I wanted to know how those TV environements behaves regarding keyboard events. Is there a reliable standard way of handling remote controllers that we can work with?

The simple JS script I used to test keyCode behavior is available here : jsbin.com/OqAhIcA/13

Tested devices :

@dharFr
dharFr / local-git-share.md
Last active December 20, 2015 15:29
Quickly share your local GIT repo

On your side :

> cd ~/path/to/your/repo/
> git daemon --reuseaddr --verbose  --base-path=. --export-all ./.git

On your co-worker side :

<!DOCTYPE html>
<html>
<head>
<meta name="description" content="A Simple Video Instant Preview Demo" />
<meta charset=utf-8 />
<title>JS Bin</title>
</head>
<body>
<video id="video" controls></video>
<form>
@dharFr
dharFr / README.md
Last active December 11, 2015 18:49
Web is more beautiful in Full Screen : A simple bookmarklet to toogle fullScreenMode in modern browsers.

Web is more beautiful in Full Screen

Toogle Fullscreen Bookmarklet

A simple bookmarklet to enable fullScreenMode in modern browsers.

Usage

  • Copy loader.js code into a bookmark's location field.
  • Press Ctrl+Enter to toogle fullscreen mode