This file contains 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
# Rename tags named foo-bar-#.#.# to v#.#.# and push the tag changes | |
git tag -l | while read t; do n="v${t##*-}"; git tag $n $t; git push --tags ; git tag -d $t; git push origin :refs/tags/$t ; done |
This file contains 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
#!/bin/env python | |
# expects python3 | |
################################################################################ | |
import argparse | |
import socket | |
import sys | |
################################################################################ |
This file contains 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
#!/bin/bash | |
# Перекодирует рекурсивно в текущем каталоге имена | |
# файлов и каталогов в транслит. | |
# | |
# Источник: http://www.ubuntu.sumy.ua/2011/03/translit.html | |
shopt -s nullglob | |
for NAME in * ; do | |
TRS=`echo $NAME | sed "y/абвгдезийклмнопрстуфхцы/abvgdezijklmnoprstufxcy/"` | |
TRS=`echo $TRS | sed "y/АБВГДЕЗИЙКЛМНОПРСТУФХЦЫ/ABVGDEZIJKLMNOPRSTUFXCY/"` |
This file contains 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
open http://www.google.com/?q=$(sysctl -n machdep.cpu.brand_string | awk '{FS=" " ; print $2 "+" $3 "+" $4}')+site:ark.intel.com | |
or, on a Linux machine | |
xdg-open http://www.google.com/?q=$(fgrep 'model name' /proc/cpuinfo | head -n 1 | awk '{FS=" " ; print $5 "+" $6}')+site:ark.intel.com |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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 | |
$db = Yii::$app->db; | |
$sql = $db->queryBuilder->batchInsert($table, $fields, $rows); | |
$db->createCommand($sql . ' ON DUPLICATE KEY UPDATE')->execute(); |