Skip to content

Instantly share code, notes, and snippets.

@navarrothiago
navarrothiago / README.md
Last active May 7, 2024 08:36
Turn your smartphone or tablet camera into a WebCam to make video conference in Linux
@UnaNancyOwen
UnaNancyOwen / GLEW1.11.0.md
Last active May 7, 2024 08:34
Install GLEW for Windows
@BretFisher
BretFisher / docker-for-mac.md
Last active May 7, 2024 08:34
Getting a Shell in the Docker Desktop Mac VM

2021 Update: Easiest option is Justin's repo and image

Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info: https://github.com/justincormack/nsenter1


@thebouv
thebouv / ducks.sh
Last active May 7, 2024 08:33
ducks: linux command for the 10 largest files in current directory
du -cks * | sort -rn | head -11
# Usually set this up in my bash profile as an alias:
# alias ducks='du -cks * | sort -rn | head -11'
# Because it is fun to type ducks on the command line. :)
@edariedl
edariedl / gist:a1c35eb68aebdf41876c
Last active May 7, 2024 08:30
Bulk delete of documents from Elasticsearch in Ruby on Rails

Bulk delete of documents from Elasticsearch in Ruby on Rails

When someone deletes his account we need to delete data from the elasticsearch. All account data are removed by bulk SQL query but elasticsearch-model cannot be notified to destroy related elasticsearch documents. I had to find out how to do it. It had to be done in the background job otherwise it could take too long.

After looking around in the source code of elasticsearch ruby gems, Elastcisearch API and with a little help from Karmi (author of elasticsearch gems) I found a solution. It consists of the following three things.

@dimasch
dimasch / redis-clear
Last active May 7, 2024 08:29
Clear a redis cache in Docker
docker exec -it container-name redis-cli FLUSHALL
@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active May 7, 2024 08:28
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }
@kenmori
kenmori / TypeScriptPractice.md
Last active May 7, 2024 08:28
TypeScript 練習問題集
@dimmduh
dimmduh / run.sh
Created February 6, 2018 03:30
How to update gitlab - ubuntu 16 - whne package 'gitlab-ce' has no installation candidate
copy text from
https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/config_file.list?os=Ubuntu&dist=xenial&source=script
put to
nano /etc/apt/sources.list.d/gitlab_gitlab-ce.list
update
gitlab-rake gitlab:backup:create STRATEGY=copy
apt-get update && sudo apt-get install gitlab-ce