Skip to content

Instantly share code, notes, and snippets.

View vijinho's full-sized avatar

Vijay vijinho

  • England
View GitHub Profile
@naveenkrdy
naveenkrdy / AdobeAMDFix.md
Last active March 21, 2024 15:30
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).

@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active June 24, 2024 21:29
[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()
 }
@hokie-sam
hokie-sam / twitterbot_api.py
Last active March 6, 2018 16:59
Simple Pyton code for creating a Twitter bot using their API.
import requests
import json
from requests.auth import AuthBase
from requests_oauthlib import OAuth1
from requests_oauthlib import OAuth1Session
# This is very simple code to start a simple Twitter bot.
# At the moment, this is only for posting tweets to your
# page. Twitter offers additional actions (Liking, Replying,
# Retweeting, etc) on their (confusing) developer website.
@vijinho
vijinho / shell_execute.php
Last active October 1, 2018 21:07
execute a command in php and return the captured output and streams stdin, stdout, stderr
<?php
define('VERBOSE', 1);
define('DEBUG', 1);
//-----------------------------------------------------------------------------
// required commands check
$commands = get_commands([
'find' => 'System command: find',
'curl' => 'https://curl.haxx.se',
'wget' => 'https://www.gnu.org/software/wget/'
@fxkraus
fxkraus / debian-install-megacli.md
Last active June 27, 2024 05:41
Install LSI MegaCli .deb package on Debian/Ubuntu

download

wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip

unzip

unzip 8-07-14_MegaCLI.zip
@hinchley
hinchley / tweets.php
Created March 17, 2017 23:21
Archive your twitter timeline into a sqlite database using PHP.
<?php
# define api keys.
define('CONSUMER_KEY', 'XXX');
define('CONSUMER_SECRET', 'XXX');
define('OAUTH_TOKEN', 'XXX');
define('OAUTH_SECRET', 'XXX');
define('USER_TIMELINE', 'https://api.twitter.com/1.1/statuses/user_timeline.json');
# tweets to retrieve per request.
@lkraider
lkraider / gs-resample.sh
Created March 7, 2017 20:06
Ghostscript PDF quality downsample
#!/bin/sh
# It seems it's very hard to set resample output quality with Ghostscript.
# So instead rely on `prepress` preset parameter to select a good /QFactor
# and override the options we don't want from there.
gs \
-o resampled.pdf \
-sDEVICE=pdfwrite \
-dPDFSETTINGS=/prepress \
@rudelm
rudelm / autofs.md
Last active June 5, 2024 20:26
Use autofs on Mac OS X to mount network shares automatically during access

Autofs on Mac OS X

With autofs you can easily mount network volumes upon first access to the folder where you want to mount the volume. Autofs is available for many OS and is preinstalled on Mac OS X so I show you how I mounted my iTunes library folder using this method.

Prepare autofs to use a separate configuration file

autofs needs to be configured so that it knows where to gets its configuration. Edit the file /etc/auto_master and add the last line:

#
# Automounter master map
#

+auto_master # Use directory service

@alexproca
alexproca / docker-machine-rename
Last active November 23, 2020 17:15
Rename docker-machine
#!/usr/bin/env bash
#copy this in a folder from path ex: /usr/local/bin
#usage: docker-machine-rename default my-default
# Authors
#
# alexproca initial script
# eurythmia sed magic
@mbbx6spp
mbbx6spp / prepare-boot-drive-from-iso
Last active February 10, 2016 00:47
Prepare bootable (USB) drive on OS X. I validated this script on a Retina MBP running Yosemite.
#!/usr/bin/env bash
# Purpose: To create a bootable (USB) drive on OSX
# Note: For a NixOS 14.12 ISO (~330MB) to a 512MB USB drive, the last step (rsync) took over 3 minutes.
declare -r platform="$(uname -s)"
if [ "${platform}" != "Darwin" ]; then
>&2 echo "Error: This will not run on ${platform} (anything other than Darwin."
exit 1
fi