Skip to content

Instantly share code, notes, and snippets.

🗿
yes the whole earth

Alberto Ramos Shujito

🗿
yes the whole earth
Block or report user

Report or block Shujito

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Shujito
Shujito / adb-uninstall.sh
Last active Mar 7, 2019
uninstall android app from all connected devices and emulators
View adb-uninstall.sh
#/bin/sh
for DEVICE in $(adb devices | grep device$ | awk '{print $1}');
do
for APP in $(find . -maxdepth 3 -type f | grep build\.gradle | xargs cat | grep applicationId | awk '{print $2}');
do
RESULT=$(echo $APP | xargs -I _ adb -s $DEVICE uninstall _ 2>/dev/null);
if [ "$RESULT" == "Success" ]; then
echo "Uninstalled $APP from $DEVICE"
fi
done;
View magick-convert.sh
if [ $1 ]; then FILENAME=$1; else exit; fi
BASENAME=$(basename -- $FILENAME)
NAME=${BASENAME%.*}
convert $FILENAME -auto-orient +profile "*" -write \
"mpr:source" -resize "1080x1080^" -gravity center -crop "1080x1080+0+0" +repage -write "$NAME-1080.jpg" +delete \
"mpr:source" -resize "720x720^" -gravity center -crop "720x720+0+0" +repage -write "$NAME-720.jpg" +delete \
"mpr:source" -resize "540x540^" -gravity center -crop "540x540+0+0" +repage -write "$NAME-540.jpg" +delete \
"mpr:source" -resize "360x360^" -gravity center -crop "360x360+0+0" +repage -write "$NAME-360.jpg" +delete \
@Shujito
Shujito / bookmarklets.md
Last active Jul 12, 2018
Useful bookmarklets
View bookmarklets.md

Useful Bookmarklets

How to use:

Create a bookmark and replace URL with either of the listed codes

Easier: (google chrome)

  • Triple click to the whole thing
  • COPY!
  • Now hit [CTRL] + [D]
@Shujito
Shujito / spotihosts
Last active Apr 12, 2018 — forked from teomaragakis/spotihosts
The hosts file entries to block Spotify audio ad servers.
View spotihosts
# taken from here:
# https://www.reddit.com/r/Piracy/comments/4kn6rq/comprehensive_guide_to_blocking_ads_on_spotify/
0.0.0.0 adclick.g.doublecklick.net
0.0.0.0 adeventtracker.spotify.com
0.0.0.0 ads-fa.spotify.com
0.0.0.0 analytics.spotify.com
0.0.0.0 audio2.spotify.com
0.0.0.0 b.scorecardresearch.com
0.0.0.0 bounceexchange.com
0.0.0.0 bs.serving-sys.com
@Shujito
Shujito / imgurer.lua
Created Nov 15, 2016
imgur permutator
View imgurer.lua
local fiveChars = ... or 'weiss'
--print('chars:', fiveChars:lower())
local function bitSet(number, offset)
local nro = bit32.rshift(number, offset)
local nroa1 = bit32.band(nro, 1)
--print('nroa1', nroa1)
return nroa1 ~= 0
end
@Shujito
Shujito / configuration.sh
Last active Nov 8, 2016
useful stuff for servers
View configuration.sh
# basic debian vps setup (configurations and security)
#################
## root config ##
# change root password
passwd
# fix locales (e.g. "Setting locale failed" messages)
locale-gen en_US.UTF-8
dpkg-reconfigure locales
@Shujito
Shujito / anoter-idea.lua
Last active Sep 2, 2016
This is an idea I have
View anoter-idea.lua
local STATE_SELECT_SONG = 0
local STATE_SELECT_CHART = 1
local STATE_CONFIRM = 2
local function makeBackgroundOrnaments(self)
-- TODO
end
local function makeForegroundOrnaments(self)
-- TODO
end
@Shujito
Shujito / recurse.lua
Created Mar 2, 2016
Recurse a lua table
View recurse.lua
local function recurse(t,lvl)
lvl = lvl or 0
for k,v in pairs(t) do
print( string.rep(' ',lvl) .. k)
if type(v) == 'table' then
recurse(v,lvl+1)
else
print( string.rep(' ',lvl) .. ' ' .. type(v) .. ':')
print( string.rep(' ',lvl) .. ' ' .. tostring(v))
end
View ScreenTitle.java
/**
* <p>Title screen, it shows the logo. Makes player join by pressing its center button.
*
* @author shujito
*/
public class ScreenTitle extends Screen {
public static final String TAG = ScreenTitle.class.getSimpleName();
private final Music mSndBgm;
private final Music mSndStart;
private final Sprite tap;
View things.java
byte[][] combinations = {
{ 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
List<Long> crcList = new ArrayList<>();
for (byte[] combination : combinations) {
crcList.add(this.crc32(combination));
}
Log.i(TAG, "combos:" + crcList);
You can’t perform that action at this time.