<commit_before>>Original: https://megumin.love

# Megumin.love
A site committed to worshipping best girl Megumin!

Runs under JS/PHP with SQLite. [Memcached](https://pecl.php.net/package/memcached) (PECL) extension required for it to work.

Written under PHP5.6, no guarantees for PHP7.

## Usage:
- Adjust "global_variables.php" to fit your Memcached login info
- Create table "yamero_counter" with column "counter" or see below for prepared query using the "megumin_yamero" database
- Insert value zero (0) into previously created "counter" column of your "yamero_counter" table or see below
- (Optional: Install phpmemcachedadmin for a simple memcached control panel. Make sure you protect it!)
- Set up cronjob for update_sql.php -- this updates the cached counter to sqlite with your set interval.
- Click!


##### Information:
The default version of this website operates with a sqlite database called "megumin_yamero.db" located on folder on top of the webroot. It also assumes you run memcached on the same server, on port 11211.
Since the php files are located in /includes/ it has to grab two folders above. If you want to change the location and name of your database please take note of this and change as needed.

#### License

Licensed under the MIT License.

##### MySQL prepared queries:

Table with column -> CREATE TABLE yamero_counter ( counter INT NOT NULL ); 

Column insert -> INSERT INTO yamero_counter (counter) VALUES ('0');

### Adding new sounds:
- Add sound files to "sounds" folder (preferably mp3, aac and ogg format)
- Adjust count.js, adding new sound(s) to the ion.sound initialization and adjusting the switch() + rsound statement

#### Example:
Previous sounds amount: 12
- Add "test.mp3", (ogg, aac) to /sounds/
- Add "test" to the ion.sound initialization within count.js
- Adjust the rsound variable, so changing the multiplier 12 to 13 within count.js

New sounds amount: 13

### Changing the Interval at which the counter updates:
- Open index.php and change "1500" on line 72 to your desired length.
- Unit used is milliseconds, 1500ms stand for 1,5s.

<commit_msg>Update readme for new sound method (late update, oops)<commit_after>>Original: https://megumin.love

# Megumin.love
A site committed to worshipping best girl Megumin!

Runs under JS/PHP with SQLite. [Memcached](https://pecl.php.net/package/memcached) (PECL) extension required for it to work.

Written under PHP5.6, no guarantees for PHP7.

## Usage:
- Adjust "global_variables.php" to fit your Memcached login info
- Create table "yamero_counter" with column "counter" or see below for prepared query using the "megumin_yamero" database
- Insert value zero (0) into previously created "counter" column of your "yamero_counter" table or see below
- (Optional: Install phpmemcachedadmin for a simple memcached control panel. Make sure you protect it!)
- Set up cronjob for update_sql.php -- this updates the cached counter to sqlite with your set interval.
- Click!


##### Information:
The default version of this website operates with a sqlite database called "megumin_yamero.db" located on folder on top of the webroot. It also assumes you run memcached on the same server, on port 11211.
Since the php files are located in /includes/ it has to grab two folders above. If you want to change the location and name of your database please take note of this and change as needed.

#### License

Licensed under the MIT License.

##### MySQL prepared queries:

Table with column -> CREATE TABLE yamero_counter ( counter INT NOT NULL ); 

Column insert -> INSERT INTO yamero_counter (counter) VALUES ('0');

### Adding new sounds:
- Add sound files to "sounds" folder (preferably mp3, aac and ogg format)
- Adjust count.js, adding new sound(s) to the ion.sound initialization and adjusting the switch() + rsound statement

#### Example:
Previous sounds amount: 47

- Add "test.mp3" (optional: ogg, aac) to /sounds/ directory
- Add "test" to the ion.sound initialization within count.js/soundboard.js
- Add "test" to the sounds array

New sounds amount: 48

##### INFO:
To add new sounds to the Soundboard, a button for each will have to be created in the soundboard.html file, and the corresponding on-click event(s) will have to be added in soundboard.js.
See the existing code for examples regarding both.

### Changing the Interval at which the counter updates:
- Open index.php and change "1500" on line 72 to your desired length.
- Unit used is milliseconds, 1500ms stand for 1,5s.


{'fraction_non_alphanumeric': 0.07706013363028953, 'fraction_numerical': 0.013363028953229399, 'mean_word_length': 4.333729216152019, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2028927', 'n_tokens_mistral': 1309, 'n_tokens_neox': 1205, 'n_words': 634}