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
var blocks = magasins.map(m => { | |
var block = $(` | |
<div class="block" style="display: inline-block; border: 2px dotted grey; margin: 10px; border-radius: 5px;"> | |
<p>${m.name}</p> | |
<img id=DB${m.pano} style="width: 200px"> | |
</div> | |
`); | |
return block; | |
}); |
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
FROM resin/%%RESIN_MACHINE_NAME%%-node | |
ENV DEBIAN_FRONTEND noninteractive | |
# Instal MySQL Server | |
RUN echo mysql-server mysql-server/root_password password root | debconf-set-selections;\ | |
echo mysql-server mysql-server/root_password_again password root | debconf-set-selections; | |
RUN apt-get update && apt-get install -yq mysql-server mysql-client libmysqlclient-dev | |
RUN sed -i -e "s@^datadir.*@datadir = /data/mysql@" /etc/mysql/my.cnf |
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
function cask-outdated() { | |
local INFO | |
local OUTDATED | |
local LATEST | |
local c | |
local available | |
local installed | |
for c in $(brew cask list); do | |
INFO=$(cask info $c 2>&1) |
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
var nfc = require('nfc').nfc; | |
var util = require('util'); | |
var Badge = { | |
logging: true, | |
read: function(callback) { | |
var Badge = this; | |
var i = 0; | |
Badge.logging && console.log('nfc.version(): ' + util.inspect(nfc.version(), { depth: 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
<?php | |
function adminer_object() { | |
class AdminerSoftware extends Adminer { | |
function login($login, $password) { | |
return true; | |
} | |
} | |
return new AdminerSoftware; | |
} | |
include "./adminer-4.2.5.php"; |
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
var Promise = require('bluebird'), | |
child_process = require('child_process') | |
exec = Promise.promisify(child_process.exec); | |
realClick(driver, "document.querySelectorAll('.srg > div:nth-child(3) > div:nth-child(1) > h3:nth-child(1) > a:nth-child(1)')[0]"); | |
function realClick(driver, element) { | |
return driver.executeScript("\ | |
document.myNamespace = {};\ | |
document.myNamespace.mousePositionHandler = function (e) {\ |
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
# Usage: mitmdump -s "modify_response_body.py mitmproxy bananas" | |
# (this script works best with --anticache) | |
from libmproxy.models import decoded | |
script = ''' | |
<script type="text/javascript"> | |
(function() { | |
var width = 400; | |
big(); |
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
(provide 'regions) | |
(defvar regions nil | |
"Regions in buffer.") | |
(defun regions-maybe-push-selection () | |
"Push mark and point if point is not in regions." | |
(let ((point (point)) | |
exists) | |
(dolist (sel regions) |
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
export EDITOR=vim | |
export ZSH="$HOME/.oh-my-zsh" | |
ZSH_THEME="nicoulaj" | |
plugins=(docker fasd fzf git helm history kubectl macos direnv mise) | |
source $ZSH/oh-my-zsh.sh | |
eval "$(atuin init zsh)" | |
export FZF_DEFAULT_OPTS="--bind ctrl-k:kill-line,ctrl-b:preview-page-up,ctrl-f:preview-page-down" | |
export _FASD_BACKENDS="native spotlight" |
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
function lastpass () { | |
url="" | |
username="" | |
password="" | |
function fill() { | |
pb=$(pbpaste) | |
osascript -e 'tell application "System Events" to keystroke tab using command down' | |
echo "$username" | pbcopy | |
osascript -e 'tell application "System Events" to keystroke "v" using command down' | |
osascript -e 'tell application "System Events" to keystroke tab' |