Go to the egghead website, i.e. Building a React.js App
run
$.each($('h4 a'), function(index, video){
console.log(video.href);
});
namespace | |
{ | |
QImage applyEffectToImage(QImage src, QGraphicsEffect *effect) | |
{ | |
if(src.isNull()) return QImage(); // No need to do anything else | |
if(!effect) return src; // No need to do anything else | |
QGraphicsScene scene; | |
QGraphicsPixmapItem item; | |
item.setPixmap(QPixmap::fromImage(src)); | |
item.setGraphicsEffect(effect); |
#!/bin/bash | |
# Recursive file convertion windows-1251 --> utf-8 | |
# Place this file in the root of your site, add execute permission and run | |
# Converts *.php, *.html, *.css, *.js files. | |
# To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command | |
find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -type f | | |
while read file | |
do |
prompt:/# kvm -version | |
QEMU emulator version 2.9.0 (v2.9.0-dirty) | |
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers | |
prompt:/# uname -a | |
Linux ThinkPad-P50 4.13.8-041308-generic #201710180430 SMP Wed Oct 18 08:33:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux |
Go to the egghead website, i.e. Building a React.js App
run
$.each($('h4 a'), function(index, video){
console.log(video.href);
});
# Save all records added in IRB console | |
EntityName.all.each { |entity| entity.save! } |
#!/bin/bash | |
# Загружаем модуль ядра Network Block Device | |
modprobe nbd | |
# "Подключаем" образ к устройству /dev/nbd0. | |
qemu-nbd --connect /dev/nbd0 --read-only /путь/к/образу.qcow2 | |
# Ищем разделы на устройстве. | |
kpartx -arvs /dev/nbd0 |
#Работа с бекапами
NB: пароль в командной строке лучше не указывать, если это не крон-like задача, конечно. Ключ -p
запрашивает ввод пароля поссле ввода команды.
mysqldump -u USER -pPASSWORD DATABASE > /path/to/file/dump.sql
###Создаём структуру базы без данных
mysqldump --no-data - u USER -pPASSWORD DATABASE > /path/to/file/schema.sql
Install OS X El Capitan
is created// | |
// Created by Andrey Streltsov on 11/06/15. | |
// Based on code from here: http://stackoverflow.com/a/28172162/365754 | |
#include "AppRunGuard.h" | |
#include <qcryptographichash.h> | |
namespace | |
{ |
function (add_copy_qt5_postbuild_step MY_APP_NAME MY_APP_BINARY_DIR) | |
ADD_CUSTOM_COMMAND( | |
TARGET ${MY_APP_NAME} POST_BUILD | |
# DEBUG | |
COMMAND ${CMAKE_COMMAND} -E copy ${Qt5Core_DIR}/../../../bin/libEGLd.dll ${MY_APP_BINARY_DIR} | |
COMMAND ${CMAKE_COMMAND} -E copy ${Qt5Core_DIR}/../../../bin/libGLESv2d.dll ${MY_APP_BINARY_DIR} | |
COMMAND ${CMAKE_COMMAND} -E copy ${Qt5Core_DIR}/../../../bin/Qt53DCored.dll ${MY_APP_BINARY_DIR} | |
COMMAND ${CMAKE_COMMAND} -E copy ${Qt5Core_DIR}/../../../bin/Qt53DExtrasd.dll ${MY_APP_BINARY_DIR} | |
COMMAND ${CMAKE_COMMAND} -E copy ${Qt5Core_DIR}/../../../bin/Qt53DInputd.dll ${MY_APP_BINARY_DIR} |