Skip to content

Instantly share code, notes, and snippets.

@caiovncius
caiovncius / drop_tables.sql
Last active Oct 2, 2020
Drop all tables from database
View drop_tables.sql
SET FOREIGN_KEY_CHECKS = 0;
SET GROUP_CONCAT_MAX_LEN=32768;
SET @tables = NULL;
SELECT GROUP_CONCAT('`', table_name, '`') INTO @tables
FROM information_schema.tables
WHERE table_schema = (SELECT DATABASE());
SELECT IFNULL(@tables,'dummy') INTO @tables;
SET @tables = CONCAT('DROP TABLE IF EXISTS ', @tables);
PREPARE stmt FROM @tables;
@caiovncius
caiovncius / deploy.sh
Created Apr 15, 2020
Fat .framework for Xcode 11
View deploy.sh
exec > /tmp/${PROJECT_NAME}_archive.log 2>&1
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
if [ "true" == ${ALREADYINVOKED:-false} ]
then
echo "RECURSION: Detected, stopping"
else
export ALREADYINVOKED="true"
@caiovncius
caiovncius / post-install.sh
Created Aug 29, 2019
Create universal Framework
View post-install.sh
# Create by @mkeremkeskin - https://gist.github.com/mkeremkeskin/da143c10de4582c4f76c0380d4676983#file-post-action-script-sh
exec > /tmp/${PROJECT_NAME}_archive.log 2>&1
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
if [ "true" == ${ALREADYINVOKED:-false} ]
then
echo "RECURSION: Detected, stopping"
else
export ALREADYINVOKED="true"
@caiovncius
caiovncius / script.sh
Created Nov 1, 2018
Fix Cocoa framework
View script.sh
#!/bin/sh
FRAMEWORK_NAME = "NAME OF FRAMEWROK"
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
# make sure the output directory exists
mkdir -p "${UNIVERSAL_OUTPUTFOLDER}"
# Step 1. Build Device and Simulator versions
View gist:23ad167c03741133cffda2cabf7daea6
grep -rl "\"version\":4" --include=*metadata.json | xargs -i@ sed -i 's/\"version\":4/\"version\":3/g' @
@caiovncius
caiovncius / build.gradle
Last active May 10, 2018
Fix Gradle Android
View build.gradle
configurations {
all*.exclude group: 'com.android.support', module: 'support-v13'
}
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:27.1.0'
}
}