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
# Place this file in the same directory as `Vagrantfile' | |
# then simply require "vagrant-snapshot.rb" at the top of Vagrantfile. | |
require 'optparse' | |
Vagrant.commands.register(:snap) { Snap::Commands } | |
# Provide rake-like desc() 'inflected' documentation | |
# See http://stackoverflow.com/questions/2948328/access-attributes-methods-comments-programmatically-in-ruby | |
class Module |
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
BEGIN { $ENV{MOJO_MAX_MESSAGE_SIZE} = 1024**3 } | |
use strict; | |
use Mojo::UserAgent; | |
$| = 1; | |
my $ua = Mojo::UserAgent->new; | |
$ua->on(start => sub { | |
my ($ua, $tx) = @_; | |
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 | |
die () { | |
msg="$1\n" | |
shift | |
printf "$msg" "$@" 1>&2 | |
exit 1 | |
} | |
use=` |
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
.host:/vmshared /mnt/vmshared fuse.vmhgfs-fuse allow_other,uid=1000,gid=1000,auto_unmount,defaults 0 0 |
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/env perl | |
use 5.010; | |
use open qw(:locale); | |
use strict; | |
use utf8; | |
use warnings qw(all); | |
use Mojo::UserAgent; | |
# FIFO queue |
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
> rPrint({first={true,1.3,"abc",{1,2,5}},22,33,last={nil,5},2},nil,"Junk") | |
Junk table | |
Junk [1] number 22 | |
Junk [2] number 33 | |
Junk [3] number 2 | |
Junk [last] table | |
Junk [last] [2] number 5 | |
Junk [first] table | |
Junk [first] [1] boolean true | |
Junk [first] [2] number 1.3 |
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 | |
# This script builds the iOS and Mac openSSL libraries with Bitcode enabled | |
# Download openssl http://www.openssl.org/source/ and place the tarball next to this script | |
# Credits: | |
# https://github.com/st3fan/ios-openssl | |
# https://github.com/x2on/OpenSSL-for-iPhone/blob/master/build-libssl.sh | |
# Peter Steinberger, PSPDFKit GmbH, @steipete. | |
# Doron Adler, GlideTalk, @Norod78 |
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/env perl | |
package Mojo::URLQueue; | |
use Mojo::Base 'Mojo::EventEmitter'; | |
use Mojo::UserAgent; | |
has queue => sub { [] }; | |
has ua => sub { Mojo::UserAgent->new(max_redirects => 5) }; | |
has concurrency => 4; |
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
# Данные Команды добавляют в автозагрузку shared folders VMware | |
# Вариант 1. | |
a. Install open-vm-tools, apt-get install open-vm-tools. | |
b. Install open-vm-tools-dkms, apt-get install open-vm-tools-dkms. | |
c. Run /usr/bin/vmware-hgfsclient, it will display your shared folder. | |
d. Update your /etc/fstab using the details below: |
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 | |
# Credit to http://www.officeformachelp.com/office/install/remove-office/ | |
osascript -e 'tell application "Remote Desktop Connection" to quit' | |
osascript -e 'tell application "Microsoft Document Connection" to quit' | |
osascript -e 'tell application "Microsoft Messenger" to quit' | |
osascript -e 'tell application "Microsoft Communicator" to quit' | |
osascript -e 'tell application "Microsoft Outlook" to quit' | |
osascript -e 'tell application "Microsoft Excel" to quit' |
OlderNewer