Skip to content

Instantly share code, notes, and snippets.

View pbojinov's full-sized avatar

Petar Bojinov pbojinov

View GitHub Profile
@handleman
handleman / rounded.js
Created May 24, 2016 17:06
Round corners of c3.js bar chart http://jsfiddle.net/5hzxegxx/27/
// --------------- Overrides to get rounded corner is bar charts ------------------
c3.chart.internal.fn.additionalConfig = {
bar_radiusAll: false,
bar_radius: 5,
tooltip_format_color: undefined
};
c3.chart.internal.fn.isOrderDesc = function () {
var config = this.config;
const fetch = (url, params) => ({
type: 'FETCH',
url,
params,
});
const fetchMiddleware = fetchImplementation => store => next => action => {
if (action.type === 'FETCH') {
const { url, params } = action;
const token = store.getState().token;
@wvance
wvance / App.jsx
Last active June 11, 2021 14:24
Full Body Dropdown Example with React Redux
import React, {PropTypes} from 'react'
import { Router, Route, Link } from 'react-router'
import {connect} from 'react-redux';
import {bindActionCreators} from 'redux';
import * as commonActions from '../actions/commonActions';
// https://github.com/okonet/react-dropzone
import Dropzone from 'react-dropzone';
// REMOVES DEFAULT STYLE FROM DROPZONE
@ebachter
ebachter / iframe_handling_in_react.js
Last active October 6, 2019 10:58
iframe handling in react
import React from 'react';
import { connect } from 'react-redux';
class PageWidget extends React.Component {
componentDidMount() {
this.ifr.onload = () => {
this.ifr.contentWindow.postMessage('hello', '*');
};
window.addEventListener("message", this.handleFrameTasks);
}
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active September 4, 2025 01:33
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

@chourobin
chourobin / 0-bridging-react-native-cheatsheet.md
Last active August 28, 2025 08:25
React Native Bridging Cheatsheet
@pawelztef
pawelztef / _flash.html.erb
Last active August 9, 2021 02:16
rails flash messages with bootstrap 4
<div class="container">
<% flash.each do |type, msg| %>
<div class="alert <%= bootstrap_class_for_flash(type) %> alert-dismissable fade show">
<%= msg %>
<button class="close" data-dismiss="alert">x</button>
</div>
<% end %>
</div>
@martinwicke
martinwicke / automobile.ipynb
Last active January 9, 2022 08:14
Estimator demo using Automobile dataset
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zkat
zkat / index.js
Last active April 30, 2025 21:38
npx is cool
#!/usr/bin/env node
console.log('yay gist')
@romaninsh
romaninsh / lambda-vpc-internet-access-cloudformation.yml
Last active December 22, 2021 00:26
CloudFormation template implementing Private network which can be used by Serverless to deploy Lambda into VPCs an maintaining internet access
# Add the following to your existing VPC CF stack
# create 2 subnets, lambdas like to be in multiple subnets
Private1:
Type: AWS::EC2::Subnet
Properties:
VpcId: !Ref VPC
AvailabilityZone: !Select [ 0, !GetAZs ]
CidrBlock: !Ref Private1CIDR