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
import sublime | |
import sublime_plugin | |
import subprocess | |
import os | |
from threading import Thread | |
##### | |
# The main compile method using the command line to navigate to the saved files directory | |
# and calling 'pdflatex' on the saved file. |
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
/* DeviceUID.h | |
#import <Foundation/Foundation.h> | |
@interface DeviceUID : NSObject | |
+ (NSString *)uid; | |
@end | |
*/ | |
// Device.m |
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
<!-- An ant target for running only tests that are part of the goup 'custom', using also a faster test setup --> | |
<target name="custom-tests" depends="build-cache-dir, build-config, build-database, build-create-admin-account, build-install-lock-file, build-disable-firstrunwizard"> | |
<exec executable="${script.phpunit}" failonerror="true" dir="${test.dir.shopware}"> | |
<arg value="--log-junit=${log.dir}/junit.xml"/> | |
<arg value="--group=custom"/> | |
</exec> | |
</target> |
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
<?php | |
return [ | |
'db' => [ | |
'username' => '<USERNAME>', | |
'password' => '<PASSWORD>', | |
'dbname' => 'shopware', | |
'host' => 'localhost', | |
'port' => '3306' | |
], | |
// Disable backend cache |
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
extension UIViewController { | |
func rz_smoothlyDeselectRows(tableView tableView: UITableView?) { | |
let selectedIndexPaths = tableView?.indexPathsForSelectedRows ?? [] | |
if let coordinator = transitionCoordinator() { | |
coordinator.animateAlongsideTransitionInView(parentViewController?.view, animation: { context in | |
selectedIndexPaths.forEach { | |
tableView?.deselectRowAtIndexPath($0, animated: context.isAnimated()) | |
} |
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 | |
# Check parameters | |
if [[ $# -ne 2 ]]; then | |
echo " Usage: $0 <dev|prod> <plugin_path>" | |
exit 1 | |
fi | |
mode=$1 | |
plugin_path=$(cd $2 && pwd) |
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
<?php | |
$referencingTableName = 's_plugin_viison_address_label_dispatch_configuration'; | |
$referencingColumnName = 'dispatchId'; | |
$prefix = 'fk'; | |
$maxSize = 30; | |
$hash = implode('', array_map(function ($column) { | |
return dechex(crc32($column)); |
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
# Load NVM | |
export NVM_DIR="$HOME/.nvm" | |
. "/usr/local/opt/nvm/nvm.sh" | |
# ls coloring etc. | |
alias ls='ls -Ga' | |
# Fix Perl locale | |
export LC_CTYPE=en_US.UTF-8 | |
export LC_ALL=en_US.UTF-8 |
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
# 1. Check for any local time machine snapshots | |
tmutil listlocalsnapshots / | |
# 2. Ask time machine to free 100 GBs of local snapshots. Third parameter '4' probably means high priority (https://apple.stackexchange.com/a/398356) | |
tmutil thinlocalsnapshots / $((100 * 1024 * 1204 * 1024)) 4 | |
# 3. Make sure that only a `(dataless)` snapshot exists | |
tmutil listlocalsnapshots / | |
# 4. List all mounted volumes and find the one mounted on '/' (probably '/dev/disk1s1') |
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
# 1. Generate a new RSA key pair (public and private key) with a 4096 bit long modulus. | |
# You can optionally pass e.g. '-aes256' to encrypt the key pair with a passphrase. The key | |
# pair will be saved as 'private.pem' ('pem' is just a container file format, | |
# see https://serverfault.com/questions/9708/what-is-a-pem-file-and-how-does-it-differ-from-other-openssl-generated-key-file). | |
openssl genrsa -out private.pem 4096 | |
# 2. Extract the public key from the RSA key pair ('private.pem'). | |
# The result is again saved in a 'pem' file, this time named 'public.pem'. | |
openssl rsa -in private.pem -outform PEM -pubout -out public.pem |
OlderNewer