Skip to content

Instantly share code, notes, and snippets.

@reharik
reharik / git-recentco
Created April 13, 2022 14:11 — forked from yoshi415/git-recentco
Git: Check out a branch from a list of recently checked out branches/tags/commits
#!/usr/bin/env bash
# Source: https://gist.github.com/fritz-c/c1e528b09bc1c0827a3c
# Original: https://gist.github.com/jordan-brough/48e2803c0ffa6dc2e0bd
# Download this script as "git-recentco" (no extension), chmod it to be executable and put it in your
# path somewhere (e.g. /usr/bin). You can then use it via `git recentco` from inside any git repo.
# Example:
#
async activity(ctx) {
let activitySql = path.join(__dirname,`./../repositories/sql/activity.sql`);
let activity = await repository(activitySql,'get_activity_by_id', ctx.params);
ctx.status = 200;
ctx.body = {
status: ctx.status,
success: true,
data: activity
};
async activity(ctx) {
let activitySql = path.join(__dirname,`./../repositories/sql/activity.sql`);
let activity = await repository(activitySql,'get_activity_by_id', ctx.params);
ctx.status = 200;
ctx.body = {
status: ctx.status,
success: true,
data: activity
};
.
├── example
│   ├── components
│   │   ├── App.js
│   │   └── DevTools.js
│   ├── reducers
│   │   └── index.js
│   ├── store
│   │   └── configureStore.js
│   ├── index.js
[
{ day:'wednesday',
events: [{
time: "7:00 AM",
task: 'do something'}
]},
{ day:'wednesday',
events: [{
time: "8:00 AM",
taks : 'do something'}
var path = require('path');
var webpack = require('webpack');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var node_modules = __dirname + '/node_modules';
const config = {
// Gives you sourcemaps without slowing down rebundling
devtool : 'cheap-module-eval-source-map',
resolve: { alias: {} },
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
nl UNCONN 0 0 rtnl:kernel *
nl UNCONN 4352 0 tcpdiag:ss/95 *
nl UNCONN 768 0 tcpdiag:kernel *
nl UNCONN 0 0 9:kernel *
nl UNCONN 0 0 10:kernel *
nl UNCONN 0 0 15:kernel *
nl UNCONN 0 0 16:kernel *
tcp LISTEN 0 128 127.0.0.1:http-alt
[
{
"Id": "f5b0c4a11f0eb23d02d2f7999ec88d0b209e7ee92cbe9929c2c723c0d7c54755",
"Created": "2016-05-25T14:48:53.141597145Z",
"Path": "npm",
"Args": [
"start"
],
"State": {
"Status": "running",
const reducers = combineReducers({
routing,
chapters: (state = {}) => state,
expandChapter
});
export default reducers;
const expandChapter = (state = {}, action = null) => {
const { connect } = require('react-redux');
module.exports = (storeKeys = [], transform, actions) => (component) => {
transform = transform || ((dataFromStore) => { return dataFromStore});
const mapStateToProps = (state, ownProps) => {
const storeDataObjs = storeKeys.map(key => ({ [key]: state[key] }));
const storeObj = Object.assign({}, ...storeDataObjs);
return transform(storeObj, ownProps);