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
| // only for desktop for now, | |
| @media screen and (min-width: 1008px) { | |
| /* during entering and leaving : */ | |
| .page-enter-active, .page-leave-active { | |
| position:absolute; | |
| max-width:725.328px; /*make sur our content keep it's original width*/ | |
| transition: all .2s ease; | |
| } |
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> | |
| <Contact /> | |
| </template> | |
| <script> | |
| import Contact from '~/components/Contact' | |
| export default { | |
| transition: 'page', // set our transition with nuxt.js | |
| components: { Contact }, | |
| } |
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
| /** | |
| * Get content from wordpress via REST Api | |
| */ | |
| const config = require('../nuxt.config.js') | |
| const axios = require('axios') | |
| // always call the proxy here : | |
| const endpoint = config.env.proxyApiBaseUrl | |
| /** | |
| * @param {int} perPage : number of post to return per page |
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
| new Vuex.Store({ | |
| state: { counter: 0 }, | |
| mutations: { | |
| increment (state) { | |
| state.counter++ | |
| } | |
| }, | |
| modules: { | |
| todos: { | |
| state: { |
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> | |
| <component :is="currentComponent" :componentData="componentData" /> | |
| <div id="route-debug"> | |
| <pre>{{route}}</pre> | |
| </div> | |
| </div> | |
| </template> | |
| <script> |
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
| // add this line to your preferences | |
| "emmet.includeLanguages": { "javascript": "javascriptreact" } |
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
| // destructuring | |
| async asyncData({ route }) { | |
| console.log(route); | |
| } | |
| // without destructuring | |
| async asyncData(allParams) { | |
| console.log(allParams.route); | |
| } |
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
| handleChange = event => { | |
| const target = event.target; | |
| const value = target.type === "checkbox" ? target.checked : target.value; | |
| const name = target.name; | |
| this.setState({ | |
| [name]: value | |
| }); | |
| }; |
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
| # lister les interfaces écoutables | |
| tcpdump --list-interfaces | |
| # écouter une interface "en0" | |
| tcpdump -i en0 | |
| # écouter le traffic entrant ou sortant d'une IP en particulier | |
| tcpdump host 1.2.3.4 | |
| tcpdump src 2.3.4.5 | |
| tcpdump dst 3.4.5.6 | |
| tcpdump port 80 |
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
| <!-- | |
| On the parent div : | |
| display:flex | |
| align-items: center; | |
| justify-content: center; | |
| --> | |
| <div style="background: silver; height: 100vh; display:flex; align-items: center;justify-content: center;" class="container"> | |
| <div style="background: yellow; height: 20vh">Center me please</div> | |
| </div> |