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
| <!-- jQuery version --> | |
| <div id="jquery-example"> | |
| <button id="btn-jq">Toggle jQuery</button> | |
| <div id="box-jq" style="display:none;">Halo dari jQuery!</div> | |
| </div> | |
| <script src="https://code.jquery.com/jquery-3.7.1.min.js"></script> | |
| <script> | |
| $('#btn-jq').click(function() { | |
| $('#box-jq').toggle(); |
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, { useState } from 'react'; | |
| import { View, Text, Image, StyleSheet, TouchableOpacity } from 'react-native'; | |
| const GameItem = () => { | |
| const [bottomContainerHeight, setBottomContainerHeight] = useState(0); | |
| return ( | |
| <View style={styles.container}> | |
| <Text style={styles.headerText}>Game section bang</Text> | |
| <Image |
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 from 'react'; | |
| import { View, Text, Image, StyleSheet, TouchableOpacity } from 'react-native'; | |
| const GameItem = () => { | |
| return ( | |
| <View style={styles.container}> | |
| <Text style={styles.headerText}>Game section bang</Text> | |
| <Image | |
| style={styles.image} | |
| source={{ uri: 'https://reactnative.dev/img/tiny_logo.png' }} |
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
| # | |
| # Sidekiq auto start using systemd unit file for Ubuntu 16.04 | |
| # | |
| # Put this in /lib/systemd/system (Ubuntu). | |
| # Run: | |
| # 1. systemctl enable sidekiq (to enable sidekiq service) | |
| # 2. systemctl {start,stop,restart} sidekiq (to start sidekiq service) | |
| # | |
| # This file corresponds to a single Sidekiq process. Add multiple copies | |
| # to run multiple processes (sidekiq-1, sidekiq-2, etc). |
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
| React.useRef to handle ReactDOMRe.domRef | |
| Here are a few solutions: | |
| ```ocaml | |
| let inputRef = React.createRef(); | |
| <input ref={ReactDOMRe.Ref.domRef(inputRef)} type="text" /> | |
| ``` | |
| If React.createRef is not available in your current version, simply use: | |
| ```ocaml | |
| let inputRef = React.useRef(Js.Nullable.null); |
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
| "library-name": "git://github.com/username/repo-name.git#branch/child-branch", |
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
| # remove all installed vim package | |
| sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common | |
| # install dependencies (for normal users) | |
| sudo apt-get install gtk+-2.0 liblua5.1-dev luajit libluajit-5.1 python-dev python3-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev | |
| # install dependencies (for ruby-rbenv users) | |
| sudo apt-get install gtk+-2.0 liblua5.1-dev luajit libluajit-5.1 python-dev python3-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev | |
| # Optional: so vim can be uninstalled again via `dpkg -r vim` |
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 fetch from 'node-fetch'; | |
| import { observable, action, runInAction } from 'mobx'; | |
| export default class GithubStore { | |
| @observable searchName; | |
| @observable user; | |
| @observable repos; | |
| @observable fetchingData; | |
| constructor() { |
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
| " General Developer Plugins | |
| Plugin 'VundleVim/Vundle.vim' | |
| " plugin manager | |
| Plugin 'Valloric/YouCompleteMe' | |
| " autocomplete 5/5 | |
| Plugin 'scrooloose/nerdtree' |
NewerOlder