Skip to content

Instantly share code, notes, and snippets.

View c01nd01r's full-sized avatar

Stanislav c01nd01r

View GitHub Profile
#!/bin/sh
DB_USER="name"
DB_PASS="password"
DB_BASE="databese"
CLOUD_USER="webdav_user"
CLOUD_PASS="webdav_password"
MOUNTH=$(date +"%Y-%m")
CLOUD_SERVER="https://webdav.yandex.ru/"
NUM_WEEK=$(date +"%V")
NUM_DAY=$(date +"%u")
anonymous
anonymous / index.html
Created July 2, 2016 21:19
JS Bin // source http://jsbin.com/yurisunimi
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
ol { counter-reset: wow }
li {
width:350px;
@ksol
ksol / gist:d1b9481c6ea8bcc9828f
Created January 23, 2015 13:06
Javascript one-liner for finding user language
var langage = (navigator.language || navigator.browserLanguage).split('-')[0];
const marky = require('marky')
const render = Vue.prototype._render
const update = Vue.prototype._update
const camelize = str => str && Vue.util.camelize(str)
function getName (vm) {
if (!vm.$parent) return 'root'
return (
camelize(vm.$options.name) ||
camelize(vm.$options._componentTag) ||
anonymous
anonymous / index.html
Created February 21, 2017 00:14
Quick example / vue-bem-cn
<div id="app"></div>
<script type="text/x-template" id="example">
<div>
<textarea v-model="test" rows="10" style="width: 900px">
</textarea>
<div>
anonymous
anonymous / index.html
Created February 21, 2017 00:27
Quick example / vue-bem-cn
<div id="app"></div>
<script type="text/x-template" id="example">
<div>
<textarea v-model="test" rows="10" style="width: 900px">
</textarea>
<textarea v-model="comp" rows="10" style="width: 900px">
</textarea>
@mrluanma
mrluanma / user_agent_casper.js
Created December 14, 2012 17:16
How to set custom UserAgent in CasperJS.
var casper = require('casper').create({
verbose: true,
logLevel: "info",
pageSettings: {
userAgent: "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11"
}
});
casper.start("https://httpbin.org/user-agent", function() {
this.test.assertTextExists(
@christianc1
christianc1 / README.md
Last active June 13, 2018 09:20
SFTP Deploys for Pressed with Circle CI

Simple SFTP Deploy when better methods are unavailable by host

Installation

  • npm install --save-dev ftps
  • Add deploy.js to theme/plugin root
  • Add deploy.config.js to theme/plugin root
  • Modify config.

Usage

  • Set up Circle CI with SFTP_HOST SFTP_PASS SFTP_USER environmental variables
@elijahmanor
elijahmanor / common-react-bugs.md
Last active May 29, 2019 19:51
Common Bugs when Learning React

Common Bugs when Learning React

The following list tries to summarize some of the things that a developer may encounter while learning React. The list focuses on scenarios that result in actual bugs (things that don't work) or things that cause warnings in the console.

  • using class prop instead of className (for/htmlFor, etc...)
  • trying to set the style prop with a string
  • not having a parent element or fragment
  • not binding (at all or incorrectly)
  • using the wrong lifecycle hook
  • misspelling componentWillReceiveProps