Skip to content

Instantly share code, notes, and snippets.

View vladdancer's full-sized avatar
🖖

Vlad Moyseenko vladdancer

🖖
View GitHub Profile
@vladdancer
vladdancer / upwork_prettify_messages_and_print.js
Last active August 30, 2019 21:52
How to print an entire Upwork message thread
$ = $ || wmjQuery || jQuery
setTimeout(function(){
$('nav').remove();
$('.composer-panel').remove();
$('div[target-selector=".main-container"]').remove();
$('nav.primary-navbar').remove();
$('#room-chat-nav').remove();
$('#room-nav').remove();
$('body').css('overflow-y', 'scroll');
$('body').css('height', '10000px');
@vladdancer
vladdancer / get_info.sh
Created July 29, 2017 17:39
[get gif duration using CLI] #shell #macos
exiftool -Duration /path/to/file.gif
@vladdancer
vladdancer / Built_In.xml
Created March 5, 2017 20:34 — forked from mglaman/Built_In.xml
Configurations to run Drupal Commerce tests in PHPStorm. add to $PROJECT/.idea/runConfigurations. The compound "Commerce Test Runner" will launch PhanomJS, PHP's built in and then run Drupal Commerce's PHPUnit tests.
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Built-in" type="PhpBuiltInWebServerConfigurationType" factoryName="PHP Built-in Web Server" singleton="true" document_root="$PROJECT_DIR$/www" port="8080">
<method />
</configuration>
</component>
@vladdancer
vladdancer / gist:3317e97991ffddac7cad63b61410fa9d
Last active January 2, 2021 11:35
test git #test-category
composer require drupal/console:~1.0 \
--prefer-dist \
--optimize-autoloader \
--sort-packages \
--no-update
@vladdancer
vladdancer / save_recursively_list_of_files_and_rename
Last active July 11, 2017 08:41
save recursively list of files and rename via wget & mmv #test-category
wget -i list_of_urls_file -P destination_folder
brew install mmv
find . -type f ! -name "*.*" | mmv '*' '#1.jpg'
@vladdancer
vladdancer / flex.less
Last active August 29, 2015 14:28 — forked from codler/flex.less
Prefix flex for IE10 and Safari / iOS in LESS
/*! Prefix flex for IE10 and Safari / iOS in LESS
* https://gist.github.com/codler/2148ba4ff096a19f08ea
* Copyright (c) 2014 Han Lin Yap http://yap.nu; MIT license */
.display(@value) when (@value = flex) {
display: -ms-flexbox; // IE10
display: -webkit-flex; // Safari / iOS
}
.display(@value) when (@value = inline-flex) {
@vladdancer
vladdancer / install_mailhog_with_ansible.sh
Created March 19, 2015 17:16
Install Mailhog with Ansible. Default HTTP port is 8025
#! /bin/bash
# Only install if not exists
if [ ! -x /usr/bin/ansible ]; then
echo ">>> Installing ansible";
#apt-get install software-properties-common
apt-add-repository ppa:ansible/ansible -y
apt-get update
apt-get install ansible -y
<?php
/**
* @file
* Code for the Message notify example feature.
*/
include_once('message_notify_example.features.inc');
/**
* Implements hook_comment_insert().
#! /bin/bash
# Only install if not exists
if [ ! -x /usr/bin/ansible ]; then
echo ">>> Installing ansible";
apt-get update
apt-get install python-pip python-dev git -y
pip install PyYAML jinja2 paramiko
@vladdancer
vladdancer / change-fetch-git-repo-url.sh
Created November 18, 2014 14:12
Change fetch git repository url
git remote set-url origin https://[email protected]/companyname/projectname.git