Skip to content

Instantly share code, notes, and snippets.

@Yousha
Yousha / gist:e64e0bd144bc94b464ce8acf9c045111
Last active Mar 6, 2017
The optional parameter for Java. (Trick)
View gist:e64e0bd144bc94b464ce8acf9c045111
public void myMethod(final Object object, final boolean... enabled)
{
// ...
if (enabled[0])
{
// top kek
}
return;
@Yousha
Yousha / iToast.java
Last active Jun 16, 2020
Improved Android Toast.
View iToast.java
public static final void iToast(final Activity context, final String message)
{
context.runOnUiThread(new Runnable()
{
@Override
public void run()
{
Toast.makeText(context.getApplicationContext(), message, Toast.LENGTH_LONG).show();
}
});
@Yousha
Yousha / .gitignore
Last active Sep 28, 2021
.gitignore for PHP developers.
View .gitignore
##### Windows
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
@Yousha
Yousha / .gitignore
Last active Aug 3, 2021
.gitignore for Java/Android developers.
View .gitignore
##### Windows
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
@Yousha
Yousha / .gitignore
Last active May 18, 2021
.gitignore for PAWN developers.
View .gitignore
##### Windows
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
@Yousha
Yousha / .gitattributes
Last active May 18, 2021
.gitattributes for PAWN developers.
View .gitattributes
* text=auto
###### Git
.gitattributes text
.gitignore text
.gitconfig text
.gitmodules text
##### Windows
*.bat text eol=crlf
@Yousha
Yousha / .gitattributes
Last active Oct 1, 2021
.gitattributes for Android(Java/C++) developers.
View .gitattributes
* text=auto
###### Git
.gitattributes text
.gitignore text
.gitconfig text
.gitmodules text
##### Windows
*.bat text eol=crlf
@Yousha
Yousha / .gitattributes
Last active Jul 21, 2021
.gitattributes for PHP developers.
View .gitattributes
* text=auto
###### Git
.gitattributes text
.gitignore text
.gitconfig text
.gitmodules text
##### Windows
*.bat text eol=crlf
@Yousha
Yousha / .gitattributes
Last active Oct 19, 2021
.gitattributes for C/C++ developers.
View .gitattributes
* text=auto
###### Git
.gitattributes text
.gitignore text
.gitconfig text
.gitmodules text
##### Windows
*.bat text eol=crlf
@Yousha
Yousha / build.xml
Last active Feb 15, 2020
Simple build.xml template for PhING https://phing.info/
View build.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- Conventions/Standards:
* Filenames consist of no more or less than two elements: name and extension
* Choose short descriptive filenames (must be less than 31 chars)
* Names must not contain dots
* Files containing PHP code must end with the extension .php
* The name portion of the file must be named exactly like the class it contains
* Buildfiles and configure rulesets must end with the extension .xml
* There must be only one class per file (no procedural methods allowed, use a