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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
let timestamps = [ | |
{ timestamp: Date.now(), period: Periods.ONE }, | |
{ timestamp: Date.now(), period: Periods.ONE }, | |
{ timestamp: Date.now(), period: Periods.ONE }, | |
{ timestamp: Date.now(), period: Periods.THREE }, | |
{ timestamp: Date.now(), period: Periods.FOUR } | |
]; | |
function createTimestampMap(timestamps) { |
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
new Date(milliseconds).toLocaleDateString() |
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
android { | |
... | |
lintOptions{ | |
disable "ResourceType" | |
} | |
} |
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 void composeEmail(String address, String subject) { | |
Intent intent = new Intent(Intent.ACTION_SENDTO); | |
intent.setData(Uri.parse("mailto:")); | |
intent.putExtra(Intent.EXTRA_EMAIL, new String[] {address}); | |
intent.putExtra(Intent.EXTRA_SUBJECT, subject); | |
if (intent.resolveActivity(getActivity().getPackageManager()) != null) { | |
getActivity().startActivity(intent); | |
} | |
} |
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
console.ignoredYellowBox = ['Remote debugger is in a background']; |
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
wget http://wordpress.org/latest.tar.gz | |
tar xfz latest.tar.gz |
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
mv wordpress/* ./ |
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
mysql -u username -p |
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
create database your_database; | |
grant usage on *.* to username@localhost identified by 'password'; | |
grant all privileges on your_database.* to username@localhost; |
OlderNewer