Skip to content

Instantly share code, notes, and snippets.

$months = [
'January',
'February',
'March',
'April',
'May',
'June',
'July',
'August',
'September',
@lordofthelake
lordofthelake / .gitignore
Created June 21, 2013 18:39
.gitignore for Maven, Intellij, Eclipse
# Eclipse
.classpath
.project
.settings/
# Intellij
.idea/
*.iml
*.iws
@Chaser324
Chaser324 / GitHub-Forking.md
Last active July 22, 2024 14:45
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@deskid
deskid / Query
Created June 20, 2017 09:48
android-room-select-query-with-like
@Query("SELECT * FROM hamster WHERE name LIKE '%' || :arg0 || '%'")
fun loadHamsters(search: String?): Flowable<List<Hamster>>
@Sharabaddin
Sharabaddin / fastfix
Last active November 7, 2021 17:36
java.sql.SQLException: The server time zone value 'EEST' is unrecognized or represents more than one time zone
ERROR: java.sql.SQLException: The server time zone value 'EEST' is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration property) to use a more specifc time zone value if you want to utilize time zone support.
SOLVE:
1. sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
2. add after line [mysqld]
default_time_zone='+03:00'
3. ctrl+o
4. ctrl+x
5. sudo service mysql restart
@marianzange
marianzange / coinbaseProSignature.js
Created August 20, 2018 13:19
Coinbase Pro HMAC signature generation for Postman
// Computes the HMAC for requests sent to the Coinbase Pro API.
//
// - Add the following code as Postman pre-request script
// - Adapt the getPatch function an the variable names according to your needs
const timestamp = Date.now() / 1000;
function getPath(url) {
// URL path regex works only if your URLs look like this: {{api_url}}/resource
// If you use hardcoded URLs or any other scheme, adapt the regex pattern!
@dmitriy-chernysh
dmitriy-chernysh / 01. TemplateFragment.kt
Last active November 24, 2022 23:02
File Templates. Android Studio. Kotlin. Fragment and ViewModel
/*
How to add this template to Android Studio:
1. Settings -> Edditor -> File and Code Templated;
2. Open "Files" tab;
3. Click icon "Plus" and paste the code below;
4. "Enable Live Templates" should be turned off.
*/
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end