Skip to content

Instantly share code, notes, and snippets.

@andyyou
andyyou / Markdium-Shell.sh
Created October 23, 2020 06:01
Markdium-Laravel 8 - Integrate Jetstream + Socialite in 30 mins
$ composer require laravel/jetstream
$ php artisan jetstream:install inertia --teams
$ npm install && npm run dev
# (opt) For customize template you should publish these views
$ php artisan vendor:publish --tag=jetstream-views

Strings

String.prototype.*

None of the string methods modify this – they always return fresh strings.

  • charAt(pos: number): string ES1

    Returns the character at index pos, as a string (JavaScript does not have a datatype for characters). str[i] is equivalent to str.charAt(i) and more concise (caveat: may not work on old engines).

@andyyou
andyyou / rails_webpacker_bootstrap_expose_jquery.md
Last active August 9, 2022 07:38
Rails 5.2 with webpacker, bootstrap, stimulus starter

Rails 5.2 with webpacker, bootstrap, stimulus starter

This gist will collects all issues we solved with Rails 5.2 and Webpacker

Create Project

# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test
@andyyou
andyyou / upload.js
Created April 15, 2016 00:23 — forked from claudiopetrini/node_upload.js
Node.js file upload on Stamplay
'use strict';
const request = require('request');
const fs = require('fs');
var formData = {
image: fs.createReadStream(__dirname + '/claudio.jpg'),
};
request.post({
@andyyou
andyyou / contest.md
Created December 14, 2015 07:52 — forked from brentvatne/contest.md
React.js Conf Contest

React.js Conf tickets, everyone wants them but we only have space for 400 people, and that includes speakers, organizers and everyone’s proud parents and grandparents! If you are into speaking and have time before December 13th, you should submit a 30 minute talk or 5 minute lightning talk proposal. If you’re more into writing than speaking or coding, ReactJSNews is giving away 1 ticket for the best blog post submission. But you probably like programming, so React Native Newsletter & Exponent are giving away two tickets for the best React Native apps made with Exponent! Of course, if you like speaking, writing and programming you should do all of the above.

Details of the contest

  • You make an “app” and publish it to Exponent. You don’t have to open source it, but people
@andyyou
andyyou / react-native-issue-sample.js
Created November 26, 2015 02:48
react-native-issue-sample.js
'use strict';
var React = require('react-native');
var {
StyleSheet,
View,
Text,
ScrollView,
} = React;
@andyyou
andyyou / react-coverflow-example_2.jsx
Last active September 13, 2016 09:10
react-coverflow support media query
import React from 'react';
import ReactDOM from 'react-dom';
import Coverflow from 'react-coverflow';
import {StyleRoot} from 'radium';
ReactDOM.render(
<StyleRoot>
<Coverflow
displayQuantityOfSide={2}
navigation={true}

#Few Line of Hack Code Make React-Native Run on Windows

While React-Native just add support of Android,yet officeally they just only support on OSX.

After a few hours of debugging, I find a simple way of let React-Native run on Windows.

Make sure all requirements were all setup following this:

Then initilize the project following this:

@andyyou
andyyou / iterm2-solarized.md
Created September 30, 2015 13:58 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)

Solarized

All binary can be downloaded http://pan.baidu.com/s/1hqH2Pko

Sublime Text 3, build 3083 (dev) for Windows x64

OFFSET ORIGINAL CRACKED
0xe21b3 85 3B

md5:c3522c719d24f85dd770c93b9bf9e56f