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
| import java.util.Calendar; | |
| import java.util.Formatter; | |
| import java.util.Locale; | |
| import java.text.SimpleDateFormat; | |
| public class DateFormaterPlayGround | |
| { | |
| String locale = "id"; | |
| public static void main(String[] args) |
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
| docker run --name mysql -itd --restart=always \ | |
| --env="MYSQL_ROOT_PASSWORD=toor" \ | |
| --volume /srv/docker/mysql:/var/lib/mysql \ | |
| --publish 3306:3306 \ | |
| mysql:5.7 |
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
| package main | |
| import ( | |
| "github.com/gin-gonic/gin" | |
| "net/http" | |
| ) | |
| type Person struct { | |
| ID string `uri:"id" binding:"required,uuid"` | |
| Name string `uri:"name" binding:"required"` |
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
| -- DDL | |
| -- Create | |
| CREATE TABLE `users` (`id` bigint unsigned not null auto_increment primary key, | |
| `name` varchar(255) not null, | |
| `email` varchar(255) not null, | |
| `email_verified_at` timestamp null, | |
| `password` varchar(255) not null, | |
| `remember_token` varchar(100) null, | |
| `created_at` timestamp null, |
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 | |
| class MailTemplateParser | |
| { | |
| protected $_openingTag = '{{'; | |
| protected $_closingTag = '}}'; | |
| protected $_emailValues; | |
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 example.com; | |
| index index.php; | |
| root /path/to/public; | |
| location / { | |
| try_files $uri /index.php$is_args$args; | |
| } |
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
| # Stop Apache and uninstall old versions of OCI8. | |
| $ service httpd stop | |
| $ pecl uninstall oci8 | |
| $ sudo yum install php-pear php-devel | |
| $ pear download pecl/oci8 | |
| # The next commands depend on the version of oci8 downloaded above. | |
| $ tar xvzf oci8-2.2.0.tgz | |
| $ cd oci8-2.2.0/ | |
| $ phpize |
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
| setenforce 0 | |
| sed -i --follow-symlinks 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/sysconfig/selinux |
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
| package main | |
| import ( | |
| "fmt" | |
| "math/rand" | |
| "sync/atomic" | |
| "time" | |
| ) | |
| type readOp struct { |
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
| # This file controls the state of SELinux on the system. | |
| # SELINUX= can take one of these three values: | |
| # enforcing - SELinux security policy is enforced. | |
| # permissive - SELinux prints warnings instead of enforcing. | |
| # disabled - No SELinux policy is loaded. | |
| SELINUX=disabled | |
| # SELINUXTYPE= can take one of three values: | |
| # targeted - Targeted processes are protected, | |
| # minimum - Modification of targeted policy. Only selected processes are protected. | |
| # mls - Multi Level Security protection. |