Skip to content

Instantly share code, notes, and snippets.

[
[
"/Users/cavin/Documents/nn/chatbot/sfdc/force-app",
{
"state": "u",
"sourcePath": "/Users/cavin/Documents/nn/chatbot/sfdc/force-app",
"isDirectory": true,
"isMetadataFile": false,
"size": 96,
"modifiedTime": 1553604546197,
@cavinsmith
cavinsmith / ORGANIZATION_RENAME.MD
Last active May 9, 2018 04:33
Easiest way to update repo origin when renaming organisation on GitHub

Updating repo origin when renaming organisation (if you have no repos with organisation name inside repo name)

git remote set-url origin `git config --get remote.origin.url | sed -e 's/OLD_ORG_NAME/NEW_ORG_NAME/g'`

The example above will have unintended bahavior if repo have organisation name inside repo name

e.g. you organisation is called bullshit and repo is called bullshit-backend - example above will rename both organisation and repository.

=== Drift === Contributors: Drift

Tags: drift, live chat, chat, communication, sales, marketing, announcements, talk to customers, customer feedback, feedback, chat plugin, free, free chat, chatra, livechat, slack, intercom, hubspot, salesforce, zapier, hellobar, hello bar, popup, ontraport, pardot, klaviyo, popup, exit intent, growth, subscribers, subscription, email form, analytics, widget, lightbox, inbound marketing, welcome mat, landing pagelivechat, olark, boldchat, online chat, online support, in-app chat, instant message, helpdesk, php live chat, snapengage, support software, website chat, wordpress chat, wordpress live chat, wordpress live chat plugin, zendesk, zopim, zopim live chat, tawk, tawk.to, tawkto, jivosite, snapengage,chat widget

Drift enables you to chat with your website visitors, increase sales and collect feedback for Free.

Requires at least: 3.4 Tested up to: 4.6.1 Stable tag: 1.8.3

@cavinsmith
cavinsmith / promiseAny.js
Last active November 16, 2017 05:17
promiseAny
const test = (type, timeout) => {
return new Promise((resolve, reject) => {
setTimeout(() => {
return (type === 'resolve' ? resolve : reject)(`${type} -> ${timeout}`)
}, timeout)
})
}
Promise.any([test('resolve', 1000), test('resolve', 2000), test('reject', 500)])
.then(result => console.log(`then: ${result}`))

apm install linter-eslint

apm install linter-stylelint

import { Component } from 'react'
// Our connector decorator
import { connect } from 'redux-getters'
// We need to have store list as constants e.g. USERS: 'users'
// Probably we can do it in store index file export
import STORES from 'reducers/index'
// Setters are redux dispatched actions as is
import { addUser } from 'actions/setters/users'
@cavinsmith
cavinsmith / nvidia.md
Last active January 23, 2024 19:30
Nvidia GPUs sorted by CUDA cores

List of desktop Nvidia GPUS ordered by CUDA core count

I created it for those who use Neural Style

Guys, please add your hardware setups, neural-style configs and results in comments!

GPU CUDA cores Memory Processor frequency
GeForce GTX TITAN Z 5760 12 GB 705 / 876
printf "# /bin/bash\necho \"Ya, ya! Das ist gut! \"\ngit \"\$@\"" > /usr/local/bin/gut; chmod +x /usr/local/bin/gut;