- Clean pkg cache
- Remove unused packages (orphans)
- Clean cache in /home
- remove old config files
- Find and Remove
- duplicates
- empty files
- empty directories
- broken symlinks
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
| certbot certificates | |
| # find the path to the fullchain certificate you wish to reinstall | |
| certbot revoke --cert-path /etc/letsencrypt/live/... #path to the cert from above | |
| certbot delete --cert-name yourdomain.com | |
| rm -Rf /etc/apache2/sites-available/000-default-le-ssl.conf #or whatever the name of the apache conf you had it configured on | |
| rm -Rf 000-default-le-ssl.conf #or whatever the name of the apache conf you had it configured on | |
| sudo apache2ctl restart | |
| certbot #follow the guide to setup the new certificate |
This gist assumes:
- you have a local git repo
- with an online remote repository (github / bitbucket etc)
- and a cloud server (Rackspace cloud / Amazon EC2 etc)
- your (PHP) scripts are served from /var/www/html/
- your webpages are executed by apache
- apache's home directory is /var/www/
First things first you need to have a new ish bluetooth adapter I have found in my testing.
It may need to be bluetooth 4 compatible I am not sure but my laptop and phone worked whereas my desktop using a £1 dongle did not.
Once you get a successful pair you may notice the controller still has a blinking light. If this is the case see below.
Install sysfsutils
sudo apt-get install sysfsutils
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 | |
| // mirror of: http://oauth.googlecode.com/svn/code/php/OAuth.php | |
| // vim: foldmethod=marker | |
| /* Generic exception class | |
| */ | |
| class OAuthException extends Exception { | |
| // pass | |
| } |
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
| UPDATE | |
| contas | |
| SET morada = | |
| IF(CONVERT(CAST(CONVERT(morada USING latin1) AS BINARY) USING utf8) IS NULL, morada, | |
| CONVERT(CAST(CONVERT(morada USING latin1) AS BINARY) USING utf8)) |
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
| <button type="button" data-backdrop='static' data-keyboard='false' class="btn btn-warning btn-xs" data-toggle="modal" data-target="#qntde"> | |
| <i class="fas fa-edit"></i> Alterar | |
| </button> |
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
| ng config schematics.@nrwl/schematics:component.styleext scss |
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
| public class LoginActivity extends AppCompatActivity { | |
| private static final int RC_SIGN_IN = 343; | |
| @Override | |
| protected void onCreate(Bundle savedInstanceState) { | |
| super.onCreate(savedInstanceState); | |
| setContentView(R.layout.activity_main); | |
| Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); | |
| setSupportActionBar(toolbar); |
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.Random; | |
| public class GeneratePassword { | |
| /** | |
| * Genera una password RANDOM | |
| */ | |
| public static final String DATA = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz|!£$%&/=@#"; | |
| public static Random RANDOM = new Random(); |
NewerOlder