This setup is loosely based on this except I removed the volumes used for data persistence as they were not needed here.
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
/* | |
Target: iOS, iOS5 | |
Let's say you have a SQLite DB to index a number of files, resources, or items in general. | |
You want to perform a full-text search on this item. Example: | |
TABLE: Item | |
---------------------------------------------------------------------- | |
ID | Name | Description |
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
package es.cloudey.pagespeed.util; | |
import java.util.HashMap; | |
import java.util.Map; | |
import android.os.Bundle; | |
import android.os.Parcelable; | |
public class CollectionUtils { | |
public static Bundle toBundle(Map<String, ? extends Parcelable> input) { |
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
// To run this script you can start the shell with `mongosh --nodb` | |
// Wrap everything into a function so we don't | |
// affect the shell's scope | |
(function insertTestData() { | |
// Config DB and Collection names | |
const dbName = '<TEST_DBNAME>'; | |
const collectionName = '<TEST_COLLNAME>'; | |
const mongoDBConnectionString = '<MONGODB_CONNECTION_STRING>'; |
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
// To run this script you can start the shell with `mongosh --nodb` | |
// Wrap everything into a function so we don't | |
// affect the shell's scope | |
(function insertTestData() { | |
// Config DB and Collection names | |
const dbName = '<TEST_DBNAME>'; | |
const collectionName = '<TEST_COLLNAME>'; | |
const mongoDBAtlasConnectionString = '<MONGODB_ATLAS_CONNECTION_STRING>'; |
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
// MongoDB Playground | |
// To disable this template go to Settings | MongoDB | Use Default Template For Playground. | |
// Make sure you are connected to enable completions and to be able to run a playground. | |
// Use Ctrl+Space inside a snippet or a string literal to trigger completions. | |
// Select the database to use. | |
use('mongodbVSCodePlaygroundDB'); | |
// The drop() command destroys all data from a collection. | |
// Make sure you run it against proper database and collection. |
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
[].slice.apply(document.querySelectorAll('.yt-lockup-title a.spf-link')).forEach(l => {const h = l.getAttribute('href'); l.setAttribute('href', `helium://https://www.youtube.com${h}`)}) |
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
package es.cloudey.webanalyzer.util; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
public class MFArrayList<E> extends ArrayList<E> { | |
private static final long serialVersionUID = 7281673743494991943L; | |
public MFArrayList(){ |
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
import java.text.DateFormat; | |
import java.text.SimpleDateFormat; | |
import java.util.Calendar; | |
public class DateUtil { | |
public static String getDate(long milliSeconds) { | |
DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss.SSS"); | |
Calendar calendar = Calendar.getInstance(); | |
calendar.setTimeInMillis(milliSeconds); | |
return formatter.format(calendar.getTime()); |
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
find . -name "*.php" | while read line; do expand -t 4 $line > $line.new; mv $line.new $line; done |
NewerOlder