Beware of Online E-Textbook Scams

Prev [Use a temporary email for subscribing](https://snippets.cacher.io/snippet/cdf5dbf2a6d173e9a539)
*Beware of Online E-Textbook Scams*

Because sites can pop up at any time if they are not using an established site, [students] should search on them for known fraud complaints,” said Mangiacapra.
“ Franco agreed that students are at risk of getting scammed if they’re not careful.
After consulting scamadviser.com, Bartholomew and Vincent Mangiacapra, associate vice president and CIO of the office of information technology, said that the website with the highest risk score is bizvios.com.
Be

ExpressJS Get Started KIT

[ExpressJS](https://expressjs.com/ru/starter/hello-world.html) - `yarn init -y` - `yarn add nodemon express` - Add in package.json ``` { ..., "scripts": { "start": "nodemon server.js" }, ..., } ```
const express = require('express');
const app = express();
const port = 4444;

app.get('/', (req, res) => {
  res.send('Hello World!');
});

app.listen(port, () => {
  console.log(`Example app listening on port http://localhost:${port}/`);
});

HelloWord

HelloWord
// 显示“Hello World”的简单 C++ 程序

// 输入输出函数的头文件
#include<iostream>

using namespace std;

// main 函数 - 程序开始执行的地方
int main()
{
	// prints hello world
	cout<<"Hello World";
	
	return 0;
}

sql_constraints Unique

    _sql_constraints = [
        (
            "name_uniq",
            "unique (unique_key)",
            """Only one value can be defined for each given usage!""",
        ),
    ]

HackMD Snippet Library

Saved from https://yukuro.hatenablog.com/entry/2021/06/03/024807
# 2022年6月29日水

- 今日やったこと
  - [ ] 研究した
  - [ ] 睡眠した

Render HTML string as raw html

If you have a bock of Rich text in tge form of HTML, it will be displayed as a string of HTML on the screen instead of rendering the markup into say, a list. This allows the list to be rendered as a list.


@Html.Raw(footerColumn.ColumnBody)

redshift_db_size

The query below returns size of databases:
https://stackoverflow.com/questions/25519872/amazon-redshift-how-to-find-database-size

select sum(mbytes)/1024 db_size_in_gb, database from (
select trim(pgdb.datname) as Database,
trim(a.name) as Table, b.mbytes
from stv_tbl_perm a
join pg_database as pgdb on pgdb.oid = a.db_id
join (select tbl, count(*) as mbytes
from stv_blocklist group by tbl) b on a.id=b.tbl
where a.slice=0
order by db_id, name)
group by database;

Increase the height of the inside banner on tablet and desktop view

@media screen and (min-width: 64em) {
    section.block-type--slider[class*="block--slider-regular"] .page-top-image-slider--static-caption .orbit__image img {
        max-height: 480px;
        height: 480px;
    }
}
@media screen and (min-width: 40em) and (max-width: 63.9375em) {
    section.block-type--slider[class*="block--slider-regular"] .page-top-image-slider--static-caption .orbit__image img {
        max-height: 400px;
        height: 400px;
    }
}

Services content from D6 (Legacy)

https://charlesbailey.us1.advisor.ws/

Biconomy Backend Node Apis

getSafeInfo
 * Get basic information about a Safe. E.g. owners, modules, version etc
baseUrl, '/v1/chains/{chainId}/safes/{address}', { path: { chainId, address } }

getIncomingTransfers
 * Get filterable list of incoming transactions
baseUrl,
    '/v1/chains/{chainId}/safes/{address}/incoming-transfers/',
{
      path: { chainId, address },
      query includes [ operations['incoming_transfers']['parameters']['query'] ]
}

MFN
getModuleTransactions
 * Get filterable list of module transactions

Push

#include<stack>
#include<iostream>

int main(){
    std::stack<int> mystack;

    mystack.push(0);    //pushing elements using push()
    mystack.push(1);
    mystack.push(2);

    while (!mystack.empty()) {
        std::cout << ' ' << mystack.top();
    }

    return 0;
}

Long project 3

from list_node import ListNode 

def is_sorted(head):  
    isSorted = True  
    # boolean that keeps track of if the sorting condition is met
    cur = head
    while cur is not None:
        if (cur.next is not None) and (cur.val > cur.next.val):  
            # determines if the following value is greater than the following
            isSorted = False  
            # results in is_sorting returning false, as it isn't sorted 
        cur = cur.next
    return isSorted 

def list_sum(head):  

Programming: install PhpStorm

# Installation guide

1. Download tar.gz archive from https://www.jetbrains.com/phpstorm/download/download-thanks.html?platform=linux
2. Exstact into /tmp
    - `tar xvzf ~/Downloads/PhpStorm*.tar.gz -C /tmp/`
3. Change the PhpStorm folder`s owner to root
    - `sudo chown -R root:root /tmp/PhpStorm*`
4. Move the PhpStorm folder to the /opt
    - `sudo mv /tmp/PhpStorm* /opt/PhpStorm`
5. Make a symlink for the executive script
    - `sudo ln -s /opt/PhpStorm/bin/phpstorm.sh /usr/local/bin/phpsto

How to use a png file as a Drupal site logo

### Default:

By default, if under Appearance > Settings > YOUR_THEME, the "Use the logo supplied by the theme" box is checked, Drupal 8.6+ looks for a logo.svg file in the root of your theme directory. 

### But what if you want to use a .png file, or put the logo somewhere else?

1. Open up YOUR_THEME.info.yml. Add a line: `logo: path/to/your/logo.extension`
2. Clear caches

Your new logo file should load, just like magic :) 

overlay image block

#block-title .cell{
    position: relative;
    transition: all 0.2s ease-in-out;
}
#block-title .cell h3{
    position: absolute;
    transform: translate(-50%,-50%);
    top: 50%;
    left: 50%;
    z-index: 998;
}
#block-title .cell .embedded-entity{
    filter: brightness(80%);
    transition: all 0.2s ease-in-out;
}
#block-title .cell:hover .embedded-entity{
    filter: brightness(60%);
}