This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
#@author cab404 | |
MUL=24 | |
if [[ $1 != "" ]]; then | |
MUL=$1 | |
fi | |
# Simple tool for converting multiple icons fo Android app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static int indexOf(CharSequence seq, int start, char ch) { | |
for (int i = start; i < seq.length(); i++) | |
if (ch == seq.charAt(i)) return i; | |
return -1; | |
} | |
public static int indexOf(CharSequence seq, char ch) { | |
return indexOf(seq, 0, ch); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.res.Resources; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.ListView; | |
import java.util.ArrayList; | |
import java.util.List; | |
/** | |
* Simple class for fast View from ViewGroup retrieving. | |
* Performs some little optimizations, such as ListView ignoring. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cab404.jsontemplate; | |
import org.json.JSONArray; | |
import org.json.JSONException; | |
import org.json.JSONObject; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cab404; | |
import java.nio.charset.Charset; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.concurrent.atomic.AtomicInteger; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; cab404: int to str, with negative numbers and stuff | |
global _start | |
section .data | |
test_data: dq -192734, 23400, -9223372036854775808, 9223372036854775807 | |
test_len: equ ($-test_data)/8 | |
section .bss | |
buf: resb 50 ; buffer, so we can print what we got. | |
buf_len: equ $-buf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script gets NetworkManager out of suspend. | |
case "$1" in | |
resume|thaw) | |
nmcli radio wifi off | |
nmcli radio wifi on | |
;; | |
esac |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.cab404.fnst; | |
/** | |
* Fenechka scheme | |
* <p/> | |
* Created at 11:19 on 26/07/15 | |
* | |
* @author cab404 | |
*/ | |
public class StandartTemplate { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Made by cab404 | |
# Licenced under GPLv3 (http://www.gnu.org/licenses/gpl-3.0.html) | |
# Musicians need food too, please pay for everything you download. Or at least something. | |
echo 'loading info' | |
wget $1 -qO- | grep 'trackinfo' > data.txt | |
OUTDIR=$(echo $1 | sed 's/\//\n/g' | sed '/^$/d' | tail -n 1) | |
mkdir $OUTDIR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def rgb2hsv(r, g, b): | |
v = max(r,g,b) | |
l = min(r,g,b) | |
sxf = (1.0 / 6) | |
trd = (1.0 / 3) | |
# actual start | |
s = l / v; | |
OlderNewer