This file contains hidden or 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
| <?php | |
| /* app/validators.php */ | |
| Validator::extend('alpha_spaces', function($attribute, $value) | |
| { | |
| return preg_match('/^[\pL\s]+$/u', $value); | |
| }); | |
| /* |
This file contains hidden or 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 TABLE `yok_bolumler` ( | |
| `id` int(10) NOT NULL AUTO_INCREMENT, | |
| `fakulteId` varchar(40) NOT NULL, | |
| `universiteId` int(6) NOT NULL, | |
| `name` varchar(255) NOT NULL, | |
| PRIMARY KEY (`id`), | |
| KEY `fakulteHash` (`fakulteId`) | |
| ) ENGINE=MyISAM; | |
| INSERT INTO `yok_bolumler` (`id`, `fakulteId`, `universiteId`, `name`) VALUES |
This file contains hidden or 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 generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This file contains hidden or 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
| server { | |
| listen 80; | |
| server_name mysite.com; | |
| root /var/www/mysite.com/; | |
| location / { | |
| if (-f $document_root/maintenance.html) { | |
| return 503; | |
| } | |
| ... # the rest of your config goes here |
This file contains hidden or 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
| -- Two dashes start a one-line comment. | |
| --[[ | |
| Adding two ['s and ]'s makes it a | |
| multi-line comment. | |
| --]] | |
| ---------------------------------------------------- | |
| -- 1. Variables and flow control. | |
| ---------------------------------------------------- |
This file contains hidden or 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
| window.app = {}; | |
| window.location.hash = ""; | |
| app.bookshelves_url = "/google_books.json"; | |
| app.shelvesIndex = {}; | |
| app.Book = Backbone.Model.extend(); |
This file contains hidden or 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
| @Test | |
| public void testVectorIteration() { | |
| Vector vector = new SequentialAccessSparseVector(100); | |
| vector.set(0, 1); | |
| vector.set(2, 2); | |
| vector.set(4, 3); | |
| vector.set(6, 4); | |
| Iterator<Vector.Element> vectorIterator = vector.iterateNonZero(); | |
| Vector.Element element = null; | |
| int i = 0; |
This file contains hidden or 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
| <?php | |
| /** | |
| * A helper file for Laravel 5, to provide autocomplete information to your IDE | |
| * Generated for Laravel 5.5.13 on 2017-09-28. | |
| * | |
| * @author Barry vd. Heuvel <[email protected]> | |
| * @see https://github.com/barryvdh/laravel-ide-helper | |
| */ | |
| namespace { | |
| exit("This file should not be included, only analyzed by your IDE"); |
This file contains hidden or 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
| server { | |
| server_name img.l; | |
| root /var/www/cache/store/ns365; | |
| index index.html; | |
| # This requests the original file from itself and then resizes the image. | |
| location ~ /resize/(\d+)x(\d+)/(.*) { | |
| proxy_pass http://img.l/$3; | |
| image_filter resize $1 $2; | |
| image_filter_jpeg_quality 90; |
This file contains hidden or 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
| -- sets all fields for a hash from a dictionary | |
| local hmset = function (key, dict) | |
| if next(dict) == nil then return nil end | |
| local bulk = {} | |
| for k, v in pairs(dict) do | |
| table.insert(bulk, k) | |
| table.insert(bulk, v) | |
| end | |
| return redis.call('HMSET', key, unpack(bulk)) | |
| end |