Google AdManager Hints

Responsive Ads var adSlot = googletag     .defineSlot(‘/6355419/Travel/Europe’, [[300, 250], [728, 90], [750, 200]], ‘multi-size-ad’)     .addService(googletag.pubads()); var mapping = googletag.sizeMapping()   .addSize([1024, 768], [[750, 200], [728, 90]])   .addSize([640, 480], [300, 250])   .addSize([0, 0], [])   .build(); adSlot.defineSizeMapping(mapping); In this example, the mapping specifies: When viewport […]

HTML5 Canvas Drawing

varcanvas=document.querySelector(‘canvas’); canvas.height=window.innerHeight; canvas.width=window.innerWidth; varc=canvas.getContext(“2d”); //rectangle c.fillStyle = “rgba(255, 0, 0, 0.8)”; c.fillRect(100,100,11,11); c.fillStyle = “rgba(255, 240, 0, 0.8)”; c.fillRect(200,100,11,11); // Filled triangle c.fillStyle = “rgba(0, 255, 0, .9)”; c.beginPath(); c.moveTo(25,25); c.lineTo(105,25); c.lineTo(25,105); c.fill(); // line c.beginPath(); c.moveTo(50, 22); c.lineTo(111,333); c.lineTo( 222, 222); c.strokeStyle = “#fa34a4”; c.stroke(); // arc / circle […]

Container and Docker

Benefits of Container Lightweight – dont include a guiest OS – spin up quivkly and scale horizontaly Portable and platform independent Support modern development and architecture Improve utilization Scale each component individually Containers VS VM Image 01   Use cases for containers Microservices Loosely coupled and independently deployable services DevOps […]

IBM Cloud Setup

CLI Download the IBM Cloud CLI Log in to IBM Cloud Run the command below in a terminal to target Namespace: [email protected]_dev$ibmcloud login -a cloud.ibm.com -o “[email protected]” -s “dev” After this step, you can use the IBM Cloud CLI to change the target region and namespace. Install the Cloud Functions plug-in $ibmcloud […]

Terminal youtube video download via youtube-dl-cli

Project description Download video from youtube  1   INSTALL pip install youtube-dl-cli 2   USAGE Add the youtube-dl-cli directory to $PATH Start using in the terminal : youtube-dl-cli 3   Example We’ll be using this Live Event from NASA TV as an example: https://www.youtube.com/watch?v=21X5lGlDOfg First, list the formats for the video: $ ~ youtube-dl –list-formats https://www.youtube.com/watch\?v\=21X5lGlDOfg […]

Deep in chmod

There’s actually 4 attribute sets you can work with via chmod. Special, User/Owner, Group, and Others in that order, when working with the four-number chmods, with that first number being special bits that can be set. chmod 4555 equates to the following: Set UID bit – Run the file as the owner regardless […]

Security – actions

Поиск вредоносного кода на сайте (БЕЗ СКАНЕРОВ) Скачать бесплатно Поиск вредоносного кода на сайте (БЕЗ СКАНЕРОВ). 1.Хакерские скрипты. Чаще всего при взломе загружают файлы, представляющие собой веб-шеллы, бэкдоры, “загрузчики”, скрипты для спам-рассылок, фишинговые страницы + обработчики форм, дорвеи и файлы-маркеры взлома. 2.Инжекты в существующих файлах. Второй по популярности тип размещения вредоносного […]

Tmux Basics

Tmux – Manage Multiple Terminal Sessions   Installing tmux in Linux Tmux is available in the official repositories of most Linux distributions. $ sudo apt-get install tmux   Creating sessions Ways of doing things tmux —– tmux new   Detaching from tmux sessions Pressing Ctrl+a  d Creating names sessions tmux […]

CSS Vendor Prefixes

They allow to use some of the features which browsers don’t yet have access to. Most commonly used within css styles like – transitions. Where the same bit of code may work differenly in various browsers. Prefix Types: -webkit- (Chrome, Safari, iOS Safari / iOS WebView, Android) -moz- (Firefox) -ms- […]