Skip to content

Instantly share code, notes, and snippets.

@premek
premek / mv.sh
Last active March 5, 2024 17:43
Rename files in linux / bash using mv command without typing the full name two times
# Put this function to your .bashrc file.
# Usage: mv oldfilename
# If you call mv without the second parameter it will prompt you to edit the filename on command line.
# Original mv is called when it's called with more than one argument.
# It's useful when you want to change just a few letters in a long name.
#
# Also see:
# - imv from renameutils
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste)
@alpsayin
alpsayin / FB-RemoveSponsored.user.js
Last active January 9, 2018 13:24
Hide/remove facebook suggested sponsored posts that appear in your feed by searching for non-timestamped posts
// -*- Mode: Javascript; tab-width: 3; indent-tabs-mode: tab; c-basic-offset: 2 -*-
/*******************************************************************************
(C)2017+ Alp Sayin
Authors: Alp Sayin <https://www.facebook.com/My-Dummy-Page-for-Development-1417283351852520/>
This work is licensed under a Creative Commons License !
See: http://creativecommons.org/licenses/by-nc-nd/4.0/
*******************************************************************************/
// ==UserScript==
// @name FB-Remove Sponsored Posts
@alpsayin
alpsayin / messengerBasketballHack.bat
Last active March 25, 2016 17:30
A small windows batch script to autoaim Facebook Messenger's hidden basketball game. Requires adb bridge. Open Messenger, start a game and run this script.Touch the ball and it will automatically make the perfect swipe to shoot the ball into the hoop. Tested on Oneplus One, Cyanogenmod 13.
set index=1
:While
if %index% gtr 10000 goto EndWHile
echo Iteration number %index%
set /A index+=1
Rem set /p xIndex=Enter X Index:
adb shell "getevent -lc 16 /dev/input/event0 | grep ABS_MT_POSITION_X | awk '{print $3}' | (read string; echo $((16#$string)))" > touch_location.txt
set /p xIndex=<touch_location.txt
echo %xIndex%
@jeffreymorganio
jeffreymorganio / uk-bounding-box.geojson
Created October 6, 2015 08:53
Longitude and latitude bounding box around the UK
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pajp
pajp / cryptsync.sh
Created June 24, 2011 13:25
cryptsync - rsync a folder to an encrypted disk image
#!/bin/bash
# cryptsync.sh - a simple script for keeping an encrypted backup of a folder
#
# Author: Rasmus Sten <cryptsync@dll.nu>
#
# For example, to make an encrypted backup of my ~/Documents folder to Dropbox:
#
# ./cryptsync.sh --init ~/Documents/ ~/Dropbox/
#