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 * as Sentry from "@sentry/node"; | |
| import imagemin from "imagemin"; | |
| import mozjpeg from "imagemin-mozjpeg"; | |
| import sharp from "sharp"; | |
| import isJpg from "is-jpg"; | |
| import * as aws from "aws-sdk"; | |
| import { Upload } from "../../types/graphqlUtils"; | |
| import { generateFilename } from "./generateFilename"; | |
| export const s3 = new aws.S3({ |
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
| cd /home/<user>/ | |
| sudo apt-get install unzip | |
| wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip | |
| unzip sdk-tools-linux-4333796.zip -d Android | |
| rm sdk-tools-linux-4333796.zip | |
| sudo apt-get install -y lib32z1 openjdk-8-jdk | |
| export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 | |
| export PATH=$PATH:$JAVA_HOME/bin | |
| printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc | |
| cd Android/tools/bin |
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 React, { Component } from "react"; | |
| import { render } from "react-dom"; | |
| import "./index.css"; | |
| class Widget extends Component { | |
| state = { text: "" }; | |
| handleChange = (e) => { | |
| this.setState({ text: e.target.value }); | |
| }; | |
| render() { |
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
| { | |
| "editor.multiCursorModifier": "ctrlCmd", | |
| "editor.snippetSuggestions": "top", | |
| "editor.formatOnPaste": true, | |
| "editor.fontFamily" : "Fira Code", | |
| "editor.fontLigatures": true, | |
| "emmet.triggerExpansionOnTab": true, | |
| "php.suggest.basic": false, | |
| "editor.autoIndent": true, | |
| "emmet.includeLanguages" : { |
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
| /* | |
| Create SLUG from a string | |
| This function rewrite the string prototype and also | |
| replace latin and other special characters. | |
| Forked by Gabriel Froes - https://gist.github.com/gabrielfroes | |
| Original Author: Mathew Byrne - https://gist.github.com/mathewbyrne/1280286 | |
| */ | |
| if (!String.prototype.slugify) { | |
| String.prototype.slugify = function () { |
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
| // Ignore those pesky styles | |
| require('ignore-styles'); | |
| // Set up babel to do its thing... env for the latest toys, react-app for CRA | |
| require('babel-register')({ | |
| ignore: /\/(build|node_modules)\//, | |
| presets: ['env', 'react-app'] | |
| }); | |
| // Now that the nonsense is over... load up the server entry point |
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
| <template> | |
| <div id="app"> | |
| <p> | |
| Pending: {{ $store.state.getInfoPending }} | |
| </p> | |
| <p> | |
| {{ $store.state.getInfoData }} | |
| </p> | |
| </div> | |
| </template> |
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 'nprogress/nprogress.css' | |
| import NProgress from 'nprogress' | |
| import axios from 'axios' | |
| const calculatePercentage = (loaded, total) => (Math.floor(loaded * 1.0) / total) | |
| const setupUpdateProgress = () => { | |
| axios.defaults.onDownloadProgress = e => { | |
| const percentage = calculatePercentage(e.loaded, e.total) |
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
| #!/usr/bin/env node | |
| // Channel ID is on the the browser URL.: https://mycompany.slack.com/messages/MYCHANNELID/ | |
| // Pass it as a parameter: node ./delete-slack-messages.js CHANNEL_ID | |
| // CONFIGURATION ####################################################################################################### | |
| const token = 'SLACK TOKEN'; | |
| // Legacy tokens are no more supported. | |
| // Please create an app or use an existing Slack App |
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
| <template> | |
| <div> | |
| <h1>Welcome!</h1> | |
| <nuxt-link to="/about">About page</nuxt-link> | |
| <img :src="flagUrl"/> | |
| <button @click="nextFlag">Next flag</button> | |
| </div> | |
| </template> | |
| <script> |