This file contains 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
you can add this to the end of your app/build.gradle: | |
task printSdkVersions { | |
doLast { | |
println "The current compileSdkVersion is: ${android.compileSdkVersion}" | |
println "The current targetSdkVersion is: ${android.defaultConfig.targetSdkVersion}" | |
println "The current minSdkVersion is: ${android.defaultConfig.minSdkVersion}" | |
} | |
} | |
gradlew printSdkVersions |
This file contains 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
==mysql | |
SELECT employee_id, date FROM attendance group by date,employee_id having count(*) >= 2 | |
DELETE t1 FROM attendance t1 | |
INNER JOIN attendance t2 | |
WHERE | |
t1.id < t2.id AND | |
t1.employee_id = t2.employee_id AND | |
t1.date = t2.date | |
; |
This file contains 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
adduser andy | |
usermod -aG sudo andy |
This file contains 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
$ sudo apt install python3-certbot-dns-digitalocean | |
$ certbot plugins | |
$ nano ~/certbot-creds.ini | |
# DigitalOcean API credentials used by Certbot | |
dns_digitalocean_token = dop_v1_4b621067b53b50.... Your API TOken | |
$ chmod 600 ~/certbot-creds.ini |
This file contains 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
SHOW VARIABLES; | |
SELECT @@GLOBAL.sql_mode; | |
CDbCommand failed to execute the SQL statement: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'total' cannot be null | |
Create mysqlId in the following way: | |
sql_mode= "" | |
SET sql_mode = ''; | |
run mysql in background |
This file contains 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
const puppeteer = require('puppeteer'); | |
var pages = {} | |
var browser; | |
var page = async() => { | |
try { | |
if (!browser) { | |
browser = await puppeteer.launch({ | |
args: [ | |
'--no-sandbox', |
This file contains 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
var http = require('http'); | |
const puppeteer = require("puppeteer"); | |
var url = require('url'); | |
const PORT = 3000; | |
let browser; | |
let pages = {} //store object if you want to store each page url | |
console.log(`Running at Port : ${PORT}`) |
This file contains 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
npm_config_user=root npm install -g ... |
This file contains 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 zgrid ( | |
id SERIAL PRIMARY KEY, | |
"user_id" integer, | |
routename VARCHAR(100), | |
visibles text, | |
invisibles text, | |
labels text, | |
filter text, | |
"updated_at" timestamp, | |
"modified_by" integer, |
This file contains 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
nano /etc/my.cnf | |
add skip-grant-table | |
[mysqld] | |
skip-grant-tables | |
port=3306 | |
datadir=/var/lib/mysql | |
NewerOlder