Skip to content

Instantly share code, notes, and snippets.

View httol's full-sized avatar
🎯
Focusing

Tom httol

🎯
Focusing
  • TianJin
View GitHub Profile
const fs = require("fs");
const bundle = fs.readFileSync("path-to-webpack-bundle.html", "utf8");
const escaped = JSON.stringify(bundle);
const js = `export default ${escaped}`;
fs.writeFileSync("javascript-output-file.ts", js);
@IsmailShurrab
IsmailShurrab / firebase notification curl
Created December 10, 2017 12:35
firebase notification curl php
<?php
$url = "https://fcm.googleapis.com/fcm/send";
$token = "your device token";
$serverKey = 'your server token of FCM project';
$title = "Notification title";
$body = "Hello I am from Your php server";
$notification = array('title' =>$title , 'text' => $body, 'sound' => 'default', 'badge' => '1');
$arrayToSend = array('to' => $token, 'notification' => $notification,'priority'=>'high');
$json = json_encode($arrayToSend);
$headers = array();
@sunnylqm
sunnylqm / .eslintrc
Created August 18, 2016 15:21
eslint for reactnative
{
"extends": "airbnb",
"parser": "babel-eslint",
"env": {
"browser": true,
"node": true,
"mocha": true
},
"rules": {
// Disable for __DEV__, __SERVER__ usage.