replace:
angular.forEach\((\w*),
with
$1.forEach(
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import traverse from 'traverse' | |
| const findGetters = obj => { | |
| const getters = [] | |
| traverse(obj).forEach(function (x) { | |
| if (this.isRoot) { | |
| return | |
| } | |
| const descriptor = Object.getOwnPropertyDescriptor( | |
| this.parent.node, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const { shellSync } = require('execa') | |
| const config = require('../../src/config/config') | |
| const { password, username } = config.databases.sql | |
| const dbName = 'my_db_name' // this DB will get migrated | |
| const dumpFileName = 'my_db_dump.sql' | |
| const shellSyncWithStdio = shCommand => | |
| shellSync(shCommand, { stdio: 'inherit' }) | |
| shellSyncWithStdio( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo yum -y install yum-utils rpmdevtools @development-tools sbcl sqlite-devel zlib-devel | |
| wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
| sudo rpm -Uvh epel-release-6*.rpm | |
| sudo yum install -y sbcl.x86_64 | |
| wget http://downloads.sourceforge.net/project/sbcl/sbcl/1.3.14/sbcl-1.3.14-source.tar.bz2 | |
| tar xfj sbcl-1.3.14-source.tar.bz2 | |
| cd sbcl-1.3.14 | |
| ./make.sh | |
| sudo sh install.sh | |
| sbcl --version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import db from './src/db' | |
| const af = async () => { | |
| const res = await db.raw( | |
| `SELECT tablename FROM pg_tables WHERE schemaname='looop'` | |
| ) | |
| console.log('res: ', res) | |
| res.rows.forEach(async table => { | |
| const { tablename } = table |
I hereby claim:
- I am capaj on github.
- I am capaj (https://keybase.io/capaj) on keybase.
- I have a public key whose fingerprint is 104C DC80 705A 485E 520E A37B 8BBA 2432 8B3B 3031
To claim this, I am signing this object:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| PS D:\git_projects\be\frontend-be.com> $env:TZ='UTC' | |
| PS D:\git_projects\be\frontend-be.com> node | |
| > new Date().toString() | |
| 'Wed Jan 11 2017 03:26:48 GMT+0100 (Central Europe Standard Time)' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import {action, toJS} from 'mobx' | |
| import storedObservable from './util/stored-observable' | |
| const state = storedObservable('contact-list-state', { | |
| contacts: [], | |
| selectedId: null, | |
| selectedType: null, | |
| get selected () { | |
| const propName = this.selectedType + 's' | |
| const collection = this[propName] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Contact { | |
| @observable title; | |
| @observable firstName; | |
| @observable lastName; | |
| @observable username; | |
| @observable picture = { | |
| thumbnail: null, | |
| medium: null, | |
| large: null, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* global localStorage */ | |
| import {observable, autorunAsync} from 'mobx' | |
| import _ from 'lodash' | |
| function storedObservable (key, defaultValue, debounce) { | |
| let fromStorage = localStorage.getItem(key) | |
| const defaultClone = _.cloneDeep(defaultValue) // we don't want to modify the given object, because userscript might want to use the original object to reset the state back to default values some time later | |
| if (fromStorage) { | |
| _.merge(defaultClone, JSON.parse(fromStorage)) | |
| } |