Skip to content

Instantly share code, notes, and snippets.

View willianmano's full-sized avatar
🎯
Focusing

Willian Mano willianmano

🎯
Focusing
View GitHub Profile
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
ssl_certificate /opt/homebrew/etc/nginx/ssl/{{host}}.crt;
ssl_certificate_key /opt/homebrew/etc/nginx/ssl/{{host}}.key;
ssl_ciphers HIGH:!aNULL:!MD5;
server_name {{host}};
root {{root}};
server {
listen 80;
server_name {{host}};
root {{root}};
add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Content-Type-Options "nosniff";
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@willianmano
willianmano / main.mustache
Created November 27, 2018 13:43
Customização do block myoverview Moodle 3.5
{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@willianmano
willianmano / purge_caches.php
Last active October 1, 2018 13:02
Moodle purge chaches with --theme option
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@willianmano
willianmano / Lottery.sol
Created September 5, 2018 13:39
A Lottery Solidity Smart Contract
pragma solidity ^0.4.21;
contract Lottery {
address public manager;
address[] public players;
constructor() public {
manager = msg.sender;
}
@willianmano
willianmano / events.php
Created May 21, 2018 12:16
Moodle redirects after login
<?php
// File located in the DB folder
$observers = array(
array(
'eventname' => '\core\event\user_loggedin',
'callback' => 'yourplugin_dashboard_redirect',
'includefile' => 'yourplugin/localib.php'
)
@willianmano
willianmano / moodle
Created April 19, 2018 10:58
Moodle cron
* * * * * www-data /usr/local/bin/run_moodle_cron_tasks
@willianmano
willianmano / mydashboard.php
Created March 23, 2018 19:54
Moove without moodledata calculation
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
@willianmano
willianmano / lib.php
Created July 19, 2017 15:27
Ranking without users link on profile picture
<?php
// This file is part of Ranking block for Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of