Skip to content

Instantly share code, notes, and snippets.

View Faliszek's full-sized avatar

Paweł Falisz Faliszek

View GitHub Profile
@Faliszek
Faliszek / box.go
Created March 28, 2018 08:57
find box
//Find box
func Find(w http.ResponseWriter, r *http.Request) {
var result Box
id := bson.ObjectIdHex(mux.Vars(r)["id"])
err := db.Boxes.FindId(id).One(&result)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#define N 10
#define STRING_LENGTH 50
struct Student
{
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <string.h>
#define N 10
#define STRING_LENGTH 50
struct Student
{
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#define N 10
struct Node
{
int Data;
struct Node *Next;
export function withAuthContext<Props: Object>(
Component: ComponentType<Props>
): ComponentType<$Diff<Props, State>> {
return function AuthContextConsumerWrapper(props: Props) {
return (
<AuthContextConsumer>{context => <Component {...context} {...props} />}</AuthContextConsumer>
);
};
}
export const CampaignCreator = graphql(gql`
mutation singleUpload($file: MyUpload!, $name: String) {
singleUpload(file: $file, name: $name) {
id
path
}
}
`)(({ mutate }) => (
<input
type="file"
export const CampaignCreator = withRouter(
injectIntl(
compose(
graphql(CREATE_CAMPAIGN, { name: "createCampaign" }),
graphql(UPDATE_CAMPAIGN_NAME, { name: "updateCampaignName" }),
graphql(UPDATE_CAMPAIGN_SOURCE, { name: "updateCampaignSource" }),
graphql(FINISH_CAMPAIGN, { name: "finishCampaign" }),
graphql(FILE_UPLOAD, { name: "singleUpload" })
)(CampaignCreatorComponent)
)
[
{
"key": "group_58b1b54102cc4",
"title": "Galeria",
"fields": [
{
"key": "field_5957c70ab2d5d",
"label": "Zdjęcia",
"name": "",
"type": "tab",
Gdzies w komopnencie
<Icon iconType="brand" name="spotify" />
Icon component:
function mappedTyped(i) {
return {
"brand": "fab"
}[i]
let component = ReasonReact.statelessComponent("Icon");
type iconType =
| Spotify;
let typeOfIcon = (t: iconType) =>
switch (t) {
| Spotify => "fab fa-spotify"
};