- Extract files
- Move the folder to
/opt - Make a symbolic link in
/usr/binwithsudo ln -s /opt/name-of-the-program/program-file /usr/bin
Use menulibre to add the entry to the menu.
| /* | |
| * mysql -u root -p < query_test.sql | |
| * senha geralmente é admin | |
| */ | |
| CREATE DATABASE name_of_the_database; | |
| SHOW DATABASES; | |
| DESCRIBE name_of_the_database; | |
| USE name_of_the_database; | |
| SHOW tables; |
| # (...) | |
| PS1='\[\033[01;32m\]\u@\h \[\033[01;34m\]\w \n \[\033[01;35m\]λ\[\033[01;00m\] ' | |
| # \u: Display the current username | |
| # \h: Display the hostname | |
| # \w : the current working directory, with $HOME abbreviated with a tilde | |
| # \n : newline | |
| # \[\033[01;35m\]: a color |
| import React, { Component } from 'react' | |
| // import Comment from './Comment' | |
| import axios from 'axios' | |
| class CommentBox extends React.Component { | |
| constructor() { | |
| super(); | |
| this.state = { | |
| showComments: false, |
| /*! | |
| * Bootstrap v3.3.7 (http://getbootstrap.com) | |
| * Copyright 2011-2016 Twitter, Inc. | |
| * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) | |
| */ | |
| /*! | |
| * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=86d371b91974c4a471afdfcaa1b4a83f) | |
| * Config saved to config.json and https://gist.github.com/86d371b91974c4a471afdfcaa1b4a83f | |
| */ |
| /* ----------------------------------------------------------------------- | |
| Blueprint CSS Framework 1.0 | |
| http://blueprintcss.org | |
| * Copyright (c) 2007-Present. See LICENSE for more info. | |
| * See README for instructions on how to use Blueprint. | |
| * For credits and origins, see AUTHORS. | |
| * This is a compressed file. See the sources in the 'src' directory. |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Document</title> | |
| <link rel="stylesheet" href="css/bootstrap.css"> | |
| <link rel="stylesheet" href="css/blueprint.css"> |
| const lineReader = require('readline').createInterface({ | |
| input: require('fs').createReadStream(process.argv[2]) | |
| }) | |
| lineReader.on('line', (line) => { | |
| console.log('Reading ', line) | |
| require('child_process').exec('curl -O ' + line, (err, stdout, stderr) => { | |
| if (err) | |
| throw err | |
| const fs = require('fs') | |
| const cwd = process.cwd() | |
| fs.readdir(cwd, 'utf8', (err, files) => { | |
| if (err) | |
| throw err | |
| files.map(f => fs.rename(f, f.replace('php', 'html'), (err, file) => { | |
| if (err) | |
| throw err |
| const fs = require('fs') | |
| const cwd = process.cwd() | |
| const contentToDelete = ` <link rel="SHORTCUT ICON" href="https://37signals.com/images/37.ico" />` | |
| const file = 'ch01_About_37signals - Copy.html' | |
| const replaceContent = (file, from, to) => { | |
| fs.readFile(file, 'utf8', (err, data) => { | |
| if (err) |