- Named functions
def foo(x:Int): Int = x + 1
// Scroll transition to anchor | |
$(function() { | |
$('a[href*="#"]:not([href="#"])').click(function() { | |
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) { | |
var target = $(this.hash); | |
target = target.length ? target : $('[name=' + this.hash.slice(1) +']'); | |
if (target.length) { | |
$('html, body').animate({ | |
scrollTop: target.offset().top | |
}, 1000); |
<?php | |
error_reporting(E_ALL); | |
ini_set('display_errors', '1'); | |
require_once 'modules/build/ZabbixApi.class.php'; | |
use ZabbixApi\ZabbixApi; | |
try | |
{ | |
$dir = "/appli/casperjs_scripts"; |
version: "3" | |
services: | |
web: | |
image: richarvey/nginx-php-fpm | |
container_name: webserver_dev | |
links: | |
- database | |
volumes: | |
- "/chemin/vers/repertoire/local:/var/www/html/" | |
ports: |
// index.js | |
// ... | |
import { ApolloClient, ApolloProvider, HttpLink, InMemoryCache } from '@apollo/client'; | |
const client = new ApolloClient({ | |
link: new HttpLink({ | |
uri: 'http://192.168.1.47:8090/graphql' | |
}), | |
cache: new InMemoryCache() | |
}); |
" BEFORE ALL | |
"""""""""""" | |
" Install: | |
" - vim-plug | |
" - a powerline font (at least) like Hack or ryanoasis/nerd-fonts for OSX via brew | |
" - run :PlugInstall | |
" - (optional) source vimrc file: :source % | |
set encoding=UTF-8 | |
set number |
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
func main() { | |
var wg sync.WaitGroup |
# This prompt inspired by gf3, sindresorhus, alrra, and mathiasbynens. | |
# but customized to me. <3 | |
default_username='thomas' | |
# Colors | |
grey="\033[38;5;248m" | |
red="\033[38;5;196m" | |
orange="\033[38;5;208m" | |
blue="\033[38;5;75m" |