Skip to content

Instantly share code, notes, and snippets.

View dfreniche's full-sized avatar

Diego Freniche dfreniche

View GitHub Profile
@dfreniche
dfreniche / best-ls.sh
Created March 10, 2021 10:52
Best ls: Rickroll made for BASH
#!/bin/bash
# Best ls for CLI RickRolling
# Just create an alias for it in a friend's / coworker computer
cat << EOF
-----------------------------------------
We're no strangers to love
You know the rules and so do I
A full commitment's what I'm thinking of
@dfreniche
dfreniche / gist:099e36788eb41dd8943605f89eb26a62
Last active April 20, 2021 08:47
This is a feature flag file for the old Appcelerator Apps. Don't judge.
{
"enabled": true,
"url": "https://www.teamwork.com/blog/introducing-teamworks-new-beautifully-designed-native-project-management/",
"text": "We at Teamwork are proud to announce the release of our new mobile Native applications! We would love to share our work with you.\n\nIf you’re interested, download the new app and make yourself at home. If you have thoughts you’d like to share, we would love to hear it.",
"acceptButtonTitle": "Check it out!",
"title": "Introducing Teamwork Beta",
"appReleasedInfo": {
"enabled": true,
"url": "https://www.teamwork.com/blog/introducing-teamworks-new-beautifully-designed-native-project-management/",
"storeurl": {
#!/bin/bash
SU_DATE="## `date "+%d %m %Y (%a)"`"
SU_TEXT1="Yesterday:"
SU_TEXT2="Today:"
SU_TEXT3="---"
# weather info
SU_WEATHER=`curl 'wttr.in/Sevilla?format=3'`
@dfreniche
dfreniche / gist:bd6aee071788b2ca94fa9892fba5f579
Created November 2, 2017 10:09
Build Phase Script for adding version information to app icon
#!/bin/sh
if [ $CONFIGURATION = "Release" ]; then
echo "NOT DOING ICON CHANGE"
exit 0
fi
echo $CONFIGURATION
echo "*** STARTED ICON CHANGE ***"
@dfreniche
dfreniche / .zshrc
Created October 31, 2017 15:24
My ZSH config
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/dfreniche/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster"
#!/bin/bash
# copied from http://blog.pragbits.com/it/2015/02/09/slack-notifications-via-curl/
# format message as a code block ```${msg}```
# SLACK_MESSAGE="\`\`\`$1\`\`\`"
SLACK_MESSAGE="$1"
SLACK_URL=https://hooks.slack.com/services/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
case "$2" in
@dfreniche
dfreniche / select-xcode.sh
Last active October 11, 2017 19:41
Rather crude script to change between Xcode 8 and Xcode 9 selecting the correct command line tools
#!/bin/bash
# if 1st param empty...
if [ -z "$1" ]
then
echo "Usage: select-xcode {8|9}"
exit
fi
XCODE8_APP=/Applications/Xcode-8.app
import Foundation
// Not Optional Operator
// Useful to print out Optional values without the "Optional" text
prefix operator !? {}
prefix func !? (any: Any?) -> Any {
if let something = any {
return something
@dfreniche
dfreniche / ideista-canvas
Last active August 29, 2015 14:06
ideista canvas: a way to spot a person who has an Idea and want you to work for free on it
__As a__ ideista
__I use a hotmail account__
__I introduce myself__ as a loser
__And I want you__ to _work for free in my shitty project_
__to develop__ _my Idea I'm not going to tell you so you can't copy because it's the new Facebook (yeah, for sure...)