Skip to content

Instantly share code, notes, and snippets.

:octocat:
Suck it and see

Guseyn Ismayylov Guseyn

:octocat:
Suck it and see
Block or report user

Report or block Guseyn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jesgs
jesgs / deploying-from-github-to-vps-using-travis-ci.md
Last active Nov 8, 2019
Deploying from Github to VPS using Travis CI
View deploying-from-github-to-vps-using-travis-ci.md

From: https://beta.psy-dreamer.com/category/automation/deploying-from-github-to-vps-using-travis-ci

Recently, I spent around 14 to 16 hours learning all of the necessary steps to getting an existing repo set up with Travis CI to run unit tests, and then once successful, connect to a remote server that isn't a PaaS (in this case, Linode) and then proceeds to use Git hooks to do post deployment things.

Starting with your local machine and you have your project already checked out from Github.

Setting Up

  • Assuming you have Ruby (at least 2.3.1) installed, run gem install travis. This installs the Travis CI command-line tools. We're going to use these tools to encrypt RSA keys that Travis will use to connect to your remote server.
  • This tutorial also assumes that you have a working repo and a Travis-CI account set up.
@Daniel-Hug
Daniel-Hug / unwrap.js
Last active Jun 16, 2019
JS: unwrap element (remove parent without removing child nodes). Demo: http://jsbin.com/hipahu/edit?html,js,output
View unwrap.js
// remove parent without removing childen
function unwrap(wrapper) {
// place childNodes in document fragment
var docFrag = document.createDocumentFragment();
while (wrapper.firstChild) {
var child = wrapper.removeChild(wrapper.firstChild);
docFrag.appendChild(child);
}
// replace wrapper with document fragment
@diolavr
diolavr / javascript.translit.js
Last active Oct 30, 2019
JavaScript translater russian to translit
View javascript.translit.js
function rus_to_latin ( str ) {
var ru = {
'а': 'a', 'б': 'b', 'в': 'v', 'г': 'g', 'д': 'd',
'е': 'e', 'ё': 'e', 'ж': 'j', 'з': 'z', 'и': 'i',
'к': 'k', 'л': 'l', 'м': 'm', 'н': 'n', 'о': 'o',
'п': 'p', 'р': 'r', 'с': 's', 'т': 't', 'у': 'u',
'ф': 'f', 'х': 'h', 'ц': 'c', 'ч': 'ch', 'ш': 'sh',
'щ': 'shch', 'ы': 'y', 'э': 'e', 'ю': 'u', 'я': 'ya'
}, n_str = [];
@jhurliman
jhurliman / base64.js
Created Sep 29, 2011 — forked from Marak/base64.js
An extremely simple implementation of base64 encoding / decoding using node.js Buffers (plus url-safe versions)
View base64.js
/*
* base64.js: An extremely simple implementation of base64 encoding / decoding using node.js Buffers
*
* (C) 2010, Nodejitsu Inc.
* (C) 2011, Cull TV, Inc.
*
*/
var base64 = exports;
You can’t perform that action at this time.