Skip to content

Instantly share code, notes, and snippets.

View lekeCoder's full-sized avatar
🏠
Working from home

Adeola Adeleke lekeCoder

🏠
Working from home
  • Nigeria
View GitHub Profile
@testshallpass
testshallpass / dropdownholder1.js
Created October 4, 2018 02:03
DropdownHolder Example #1
export class App extends React.Component {
render() {
return (
<View style={{width: '100%', height: '100%'}}>
<Nav/>
<DropdownAlert ref={(ref) => DropDownHolder.setDropDown(ref)}/>
</View>
)
}
}
@polbins
polbins / Fastfile
Created October 3, 2017 03:25
Fastlane script for Uploading to Slack and Play Store Alpha
default_platform :android
platform :android do
before_all do
ENV["SLACK_URL"] = "https://hooks.slack.com/services/ABC/123/XYZ"
end
######################### PUBLIC LANES #########################
desc "Deploy a new Prod APK version to Play Store Alpha"
@Jeevuz
Jeevuz / Extensions.kt
Last active January 3, 2023 10:25
Here I collect some of my most useful Kotlin extensions
inline fun SharedPreferences.edit(changes: SharedPreferences.Editor.() -> SharedPreferences.Editor) {
edit().changes().apply()
}
fun ImageView.tintSrc(@ColorRes colorRes: Int) {
val drawable = DrawableCompat.wrap(drawable)
DrawableCompat.setTint(drawable, ContextCompat.getColor(context, colorRes))
setImageDrawable(drawable)
if (drawable is TintAwareDrawable) invalidate() // Because in this case setImageDrawable will not call invalidate()
}
@Haehnchen
Haehnchen / decrypt.java
Created May 14, 2017 15:43
PHP encrypt and JAVA decrypt with openssl and AES-128-CBC
public static String decrypt(@NotNull String input, @NotNull String key){
byte[] bytes = Base64.decodeBase64(input);
if(bytes.length < 17) {
return null;
}
byte[] ivBytes = Arrays.copyOfRange(bytes, 0, 16);
byte[] contentBytes = Arrays.copyOfRange(bytes, 16, bytes.length);
@xaviablaza-zz
xaviablaza-zz / TicTacToe.java
Created October 6, 2012 12:39
A simple Tic-Tac-Toe game.
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.Scanner;
/**
*
* @author MeneXia (Xavi Ablaza)
*
*/
public class TicTacToe {
Don't worry about what anybody else is going to do. The best way to
predict the future is to invent it.
-- Alan Kay
Premature optimization is the root of all evil (or at least most of it)
in programming.
-- Donald Knuth
Lisp has jokingly been called "the most intelligent way to misuse a
computer". I think that description is a great compliment because it