Skip to content

Instantly share code, notes, and snippets.

View jogerj's full-sized avatar
🟢
Online

Jonathan Joewono jogerj

🟢
Online
View GitHub Profile
@cb372
cb372 / hide-promoted-tweets.user.js
Created March 24, 2012 08:06
A simple userscript to hide promoted tweets on twitter.com
// ==UserScript==
// @match http://twitter.com/*
// @match https://twitter.com/*
// ==/UserScript==
elems = document.getElementsByClassName('tweet')
for (var i=0; i<elems.length; i++) {
e = elems[i];
if (e.nodeName.toLowerCase() == 'div' &&
e.attributes['data-promoted'] &&
e.attributes['data-promoted'].value == "true") {
@martynjarvis
martynjarvis / dnsapi.dll.md
Last active August 19, 2024 09:08
Fix dnsapi.dll error when running EVE online with Wine

Problem

Launcher would correctly load. However, the game would not launch from the launcher.

The following line was seen in output

err:module:import_dll Library DNSAPI.dll

Solution

@fliedonion
fliedonion / !GIST file list order - summary.md
Last active October 15, 2024 03:28
Understand GIST file list order.
Summary How to control (or Understand) your GIST page's files list order.
Notice not official documentation.
@mort3za
mort3za / git-auto-sign-commits.sh
Last active May 28, 2024 20:51
Auto sign your git commits
# Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands)
gpg --gen-key
# maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null`
# check current keys:
gpg --list-secret-keys --keyid-format LONG
# See your gpg public key:
gpg --armor --export YOUR_KEY_ID
# YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333)
@ajdruff
ajdruff / fix-git-line-endings
Last active November 11, 2024 03:24
Forces all line endings to LF in your git repo.
#####################
#
# Use this with or without the .gitattributes snippet with this Gist
# create a fixle.sh file, paste this in and run it.
# Why do you want this ? Because Git will see diffs between files shared between Linux and Windows due to differences in line ending handling ( Windows uses CRLF and Unix LF)
# This Gist normalizes handling by forcing everything to use Unix style.
#####################
# Fix Line Endings - Force All Line Endings to LF and Not Windows Default CR or CRLF
@dideler
dideler / bot.rb
Last active November 18, 2024 13:14
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
@ayyybe
ayyybe / ccdl.command
Last active September 12, 2024 02:13
Adobe Offline Package Builder v0.1.2 (macOS only) --- No longer being maintained.
#!/bin/bash
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
clear
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
clear
#!/bin/bash
function rcon {
[PATH_TO_TOOLS_DIR]/mcrcon -H 127.0.0.1 -P [RCON_PORT] -p [RCON_PASSWORD] "$1"
}
rcon "save-off"
rcon "save-all"
tar -cvpzf [PATH_TO_BACKUP_DIR]/server-$(date +%F_%R).tar.gz [PATH_TO_MINECRAFT_SERVER_DIR]
rcon "save-on"
## Delete older backups
[PATH_TO_BACKUP_DIR] -type f -mtime +7 -name '*.gz' -delete
@naveenkrdy
naveenkrdy / AdobeAMDFix.md
Last active November 14, 2024 10:53
To fix adobe products crashes on AMD hackintosh

Adobe Crash Fix XLNC

Instructions

  1. Install needed adobe apps from adobe creative cloud.

  2. Open Terminal.

  3. Copy-paste the below command to your terminal and run it (enter password when asked).

@benigumocom
benigumocom / debug_from_qr.py
Last active October 28, 2024 02:31
Connect Wireless Debug from Terminal on Android11
#!/usr/bin/env python3
"""
Android11
Pair and connect devices for wireless debug on terminal
python-zeroconf: A pure python implementation of multicast DNS service discovery
https://github.com/jstasiak/python-zeroconf
"""