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
| #!/bin/bash | |
| # Creates a ramdisk and start Xcode with the DerivedData stored in ramdisk. Also deletes the ramdisk and reset Xcode prefs. | |
| # xc_ramdisk.sh | |
| # - creates a ramdisk, set Xcode DerivedData to this disk and start Xcode. | |
| # - umount a ramdisk, set Xcode DerivedData to default | |
| # Stephan Burlot, Coriolis Technologies, http://www.coriolis.ch | |
| # | |
| # based on Alex Shevchenko xcode_ramdisk.sh script (https://gist.github.com/skeeet/2367298) | |
| # based on Diego Freniche xc-launch.sh script (https://github.com/dfreniche/xc-launch) |
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
| STHTTPRequest* r = [STHTTPRequest requestWithURLString:POST_CONTRACT_URL]; | |
| NSDictionary *dataToEncode = @{@"key0": @"object", | |
| // other data... | |
| @"key1": @"object"}; | |
| NSData* jsonData = [NSJSONSerialization dataWithJSONObject:dataToEncode | |
| options:NSJSONWritingPrettyPrinted | |
| error:&writeError]; |
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
| @property (nonatomic, strong) UITapGestureRecognizer *gesture; | |
| //========================================================================================== | |
| - (void)viewDidAppear:(BOOL)animated | |
| { | |
| [super viewDidAppear:animated]; | |
| self.gesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTap:)]; | |
| self.gesture.numberOfTapsRequired = 1; | |
| self.gesture.numberOfTouchesRequired = 1; | |
| self.gesture.delegate = self; |
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
| #!/usr/bin/perl | |
| require WebService::Prowl; | |
| my $oldvalue = ""; | |
| my $md5 = ""; | |
| $result = `curl -s "https://www.arqbackup.com/download/arq5_release_notes.html" | md5sum`; | |
| ($md5, $ignore) = split(/\s/, $result); |
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
| #!/usr/bin/perl | |
| ## unban an IP using iptables | |
| ## script will display the iptable command to run, it will not delete the rule (if found) | |
| ## Usage: ./unban.pl -ip=123.123.123.123 | |
| use Getopt::Long; | |
| @LINES = `iptables -L -n`; |
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
| #!/usr/bin/perl | |
| # vi:set ts=4 nu: | |
| use strict; | |
| use POSIX 'strftime'; | |
| use Net::SSL::ExpireDate; | |
| use Date::Parse; | |
| use Data::Dumper; | |
| use MIME::Lite; |
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
| #!/usr/bin/perl | |
| # I use updraft to backup WordPress sites, I need to monitor S3 bucket size because money | |
| # This script will report the size used by all buckets, used to monitor the | |
| # size of all buckets. | |
| # It uses s3cmd https://s3tools.org/s3cmd | |
| # Outputs and send via email the size of all buckets, sorted by size, with | |
| # total size of all buckets | |
| # | |
| # Stephan Burlot sburlot@coriolis.ch Apr 2024 | |
| # |
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
| #!/usr/bin/perl | |
| # I use updraft to backup WordPress sites, I need to monitor BackBlaze/b2 bucket size because money | |
| # This script will report the size used by all buckets, used to monitor the | |
| # size of all buckets. | |
| # It uses s3cmd https://s3tools.org/s3cmd | |
| # Outputs and send via email the size of all buckets, sorted by size, with | |
| # total size of all buckets | |
| # | |
| # Stephan Burlot sburlot@coriolis.ch Apr 2024 | |
| # |
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
| #!/usr/bin/python3 | |
| # When snoozing a Fastmail ( fastmail.com ) message, mark it as unread so when it appears | |
| # again in the INBOX it's unread and I can see it, instead of being another | |
| # email lost in all my messages | |
| # run it as an hourly cron | |
| # tested with Python 3.10.12 | |
| # | |
| # Stephan Burlot sburlot@coriolis.ch Apr 2024 | |
| # |
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
| #!/usr/bin/env php | |
| <?php | |
| /* | |
| Little helper tool to help me manage all my WordPress sites | |
| Needs MainWP https://mainwp.com/ installed and configured | |
| Creates a CSV file with all sites managed by MainWP | |
| CSV File with site name, url, WP version, PHP version and name of theme | |
| Tested with PHP 8.1.27 |