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
require 'formula' | |
class Libxl < Formula | |
homepage 'http://www.libxl.com/' | |
url 'ftp://xlware.com/libxl-mac-3.6.0.tar.gz' | |
sha1 '52da78f73e4a8e727c8c73c99435f4136e3774c2' | |
def install | |
lib.install 'lib/libxl.dylib' | |
include.install Dir["include_c/*.h"] |
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
set encoding=utf-8 | |
set number | |
set title | |
syntax on | |
set autoindent | |
set expandtab | |
set background=dark |
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/sh | |
apt-get install -y curl | |
CURRENT=$(node -v) | |
VERSION=$(curl -L -s http://nodejs.org/dist/latest/ \ | |
| egrep -o '[0-9]+\.[0-9]+\.[0-9]+' \ | |
| tail -n1) | |
PLATFORM=linux | |
ARCH=x64 | |
PREFIX="/usr/local/" | |
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
--- tdbtool.c 2008-01-20 22:26:37.000000000 +0100 | |
+++ tdbtool.c 2008-01-20 22:27:45.000000000 +0100 | |
@@ -169,23 +169,21 @@ | |
static void help(void) | |
{ | |
- printf(" | |
-tdbtool: | |
- create dbname : create a database | |
- open dbname : open an existing database |
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 | |
BACKUP=/home/backups/redis | |
REDIS_SOURCE=/var/lib/redis/dump.rdb | |
REDIS_DEST=$BACKUP/$(date +"%Y-%m-%d")-dump.rdb | |
find $BACKUP/* -name "*.rdb" -mtime +7 -exec rm {} \; | |
redis-cli save > /dev/null | |
cp $REDIS_SOURCE $REDIS_DEST |
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
#!/usr/bin/expect | |
spawn mysql -u root -p | |
expect "assword:" | |
send "<pass>\r" | |
interact |
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
# Catalina | |
sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia \ ~/Code | |
--volume /Volumes/Install\ macOS\ Mojave \ | |
--nointeraction | |
# Mojave | |
sudo /Applications/Install\ macOS\ Mojave.app/Contents/Resources/createinstallmedia \ ~/Code | |
--volume /Volumes/Install\ macOS\ Sierra \ | |
--nointeraction |
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
# cpu | |
time echo "scale=5000; a(1)*4" | bc -l | |
# disk | |
time sh -c "dd if=/dev/zero of=/tmp/test.tmp bs=4k count=200000 && sync" | |
# io | |
mysqlslap --user=root --password --concurrency=50 --iterations=10 --number-int-cols=5 --number-char-cols=20 --auto-generate-sql --verbose | |
# à tester |
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
- name: install ssh keys | |
copy: | |
content: "{{ item.value }}" | |
dest: /home/www/.ssh/{{ item.key }} | |
mode: 0600 | |
owner: www | |
with_dict: github_ssh_keys | |
no_log: True | |
- name: install ssh key |
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
CODEMOD_PATH="/tmp/js-codemod" | |
npm i -g eslint jscodeshift | |
git clone https://github.com/cpojer/js-codemod.git | |
# Run eslint fix | |
npm run cli eslint --fix "$1" | |
# Run es6 codemod | |
for codemod in no-vars template-literals object-shorthand unchain-variables unquote-properties updated-computed-props; |
OlderNewer