sudo rpi-update
sudo reboot
Note: this may enable the Predictable Network Interface Names settings.
sudo rpi-update
sudo reboot
Note: this may enable the Predictable Network Interface Names settings.
rebase
vs merge
).rebase
vs merge
)reset
vs checkout
vs revert
)git rev-parse
)pull
vs fetch
)stash
vs branch
)reset
vs checkout
vs revert
)!function( $ ){ | |
"use strict"; | |
// include modified jquery.execReeady.js RIGHT AFTER jquery script, to handle onReady as mod exec | |
// the approach taken here is this: | |
// only the absolutely necessary assets (scripts/styles) should be included in ALL pages (e.g jquery, jquery.execReday, smoothState.js, smoothState-wordpress.js) | |
// all other assets (scripts/styles) per specific page should be included INSIDE the page part handled by smoothState, this script will make sure everything will load and init as transparently as possible | |
// the smoothState container element is #page and the replaced element is #page > .site.inner which should have a class .page-transition as well | |
// the transitions are parametrisable through some global settings under window.WPSmoothStateOptions which includes duration, inTransition, outTransition classes | |
// but one can change that if one wishes, this is quite generic since i use libraries of css-based animations with lots of options, so i find this more generic and parametrisable at wil |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<title>MiniCodepenClone</title> | |
<style> | |
body,textarea,iframe{ margin:0; box-sizing:border-box; } | |
textarea,iframe { width:100%; height:50vh; float:left; } | |
textarea { color:#eee; background:#111; font-family:monospace; font-size:11pt; line-height:1.4; width:33.33%; } | |
#shareBtn { position:absolute; bottom:0; left:0; } |
import sys | |
f1 = open(sys.argv[1]) | |
count = 0 | |
true = 0 | |
false = 0 | |
sentences = 0 | |
for line in f1: | |
if line == '\n' or line.split()==[]: | |
sentences+=1 |
new_values = { 10 => "test1", 20 => "test2" } | |
value = new_values.map { |product_id, value| "(#{product_id}, #{value})" }.join(",") | |
ActiveRecord::Base.connection.execute(%( | |
UPDATE products AS p SET value = v.value | |
FROM (values #{values}) AS v(id, value) | |
WHERE p.id = v.id | |
)) |
# -*- coding: utf-8 -*- | |
# Copyright (C) 2010 Mathieu Blondel | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, |
#!/usr/bin/bash | |
# Convert *.gif into *.mp4, skip if already exists. | |
outdir="." | |
for path in *.gif; do | |
out="${outdir}/${path/.gif/}.mp4" | |
[[ -f "$out" ]] && continue | |
ffmpeg -f gif -i "${path}" "${out}" | |
done |