Skip to content

Instantly share code, notes, and snippets.

@Yousha
Yousha / .gitattributes
Last active November 14, 2023 01:33
.gitattributes for C/C++ developers.
* text=auto
###### Git
.gitattributes text
.gitignore text
.gitconfig text
.gitmodules text
##### Windows
*.bat text eol=crlf
@Yousha
Yousha / .gitattributes
Last active March 8, 2023 11:17
.gitattributes for PHP developers.
* text=auto
###### Git
.gitattributes text
.gitignore text
.gitconfig text
.gitmodules text
##### Windows
*.bat text eol=crlf
@Yousha
Yousha / .gitattributes
Last active February 13, 2024 07:32
.gitattributes for Android(Java/C++) developers.
* text=auto
###### Git
.gitattributes text
.gitignore text
.gitconfig text
.gitmodules text
##### Windows
*.bat text eol=crlf
@Yousha
Yousha / .gitattributes
Last active May 18, 2021 06:14
.gitattributes for PAWN developers.
* text=auto
###### Git
.gitattributes text
.gitignore text
.gitconfig text
.gitmodules text
##### Windows
*.bat text eol=crlf
@Yousha
Yousha / .gitignore
Last active May 18, 2021 06:14
.gitignore for PAWN developers.
##### Windows
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
@Yousha
Yousha / .gitignore
Last active August 25, 2023 07:44
.gitignore for Java/Android developers.
##### Windows
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
@Yousha
Yousha / .gitignore
Last active May 1, 2024 04:55
.gitignore for PHP developers.
##### Windows
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
@Yousha
Yousha / iToast.java
Last active June 16, 2020 08:46
Improved Android Toast.
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 / gist:e64e0bd144bc94b464ce8acf9c045111
Last active March 6, 2017 15:26
The optional parameter for Java. (Trick)
public void myMethod(final Object object, final boolean... enabled)
{
// ...
if (enabled[0])
{
// top kek
}
return;