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 bash | |
(set -x; brew update;) | |
(set -x; brew cleanup;) | |
(set -x; brew cask cleanup;) | |
red=`tput setaf 1` | |
green=`tput setaf 2` | |
reset=`tput sgr0` |
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
package com.amertkara.springframework.multiplerunners.subcommands.analyzer; | |
import org.apache.commons.cli.*; | |
import org.springframework.boot.CommandLineRunner; | |
import org.springframework.stereotype.Component; | |
import javax.annotation.PostConstruct; | |
@Component | |
public class AnalyzerCommand implements CommandLineRunner { |
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
sudo /usr/sbin/dseditgroup -o create -r 'Jenkins CI Group' -i 600 _jenkins | |
sudo dscl . -append /Groups/_jenkins passwd "*" | |
sudo dscl . -create /Users/_jenkins | |
sudo dscl . -append /Users/_jenkins RecordName jenkins | |
sudo dscl . -append /Users/_jenkins RealName "Jenkins CI Server" | |
sudo dscl . -append /Users/_jenkins uid 600 | |
sudo dscl . -append /Users/_jenkins gid 600 | |
sudo dscl . -append /Users/_jenkins shell /usr/bin/false | |
sudo dscl . -append /Users/_jenkins home /var/jenkins | |
sudo dscl . -append /Users/_jenkins passwd "*" |
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
<?xml version="1.0" encoding="ISO-8859-1"?> | |
<ivy-module version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:noNamespaceSchemaLocation="http://ant.apache.org/ivy/schemas/ivy.xsd"> | |
<info organisation="com.amertkara" module="module-name-comes-here" revision="0.1"/> | |
<publications> | |
<artifact type="jar" name="jar-name" conf="default" /> | |
</publications> | |
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
// Skips the FTP details | |
if(is_admin()) { | |
add_filter('filesystem_method', create_function('$a', 'return "direct";' )); | |
define( 'FS_CHMOD_DIR', 0751 ); | |
} |
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
import sys | |
import os | |
sys.path.append('path/to/django/project/root') | |
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' | |
from django.conf import settings |
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
# -*- coding: utf-8 -*- | |
import json | |
import urllib2 | |
from M2Crypto import X509 | |
from base64 import b64decode | |
from M2Crypto.Err import M2CryptoError | |
SNS_MESSAGE_TYPE_SUB_NOTIFICATION = "SubscriptionConfirmation" | |
SNS_MESSAGE_TYPE_NOTIFICATION = "Notification" | |
SNS_MESSAGE_TYPE_UNSUB_NOTIFICATION = "UnsubscribeConfirmation" |
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
def get_week_day(week_year, week_number, week_day=0): | |
""" For a given year and week_number, gets the day of that particular week | |
If week_year is 2014, week_number is 14 and week_day = 0, | |
it returns datetime.datetime(2014, 4, 6, 0, 0) | |
Args: | |
week_year (int) | |
week_number (int) | |
week_day (int): default is Sunday (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
<?php | |
define( '_JEXEC', 1 ); | |
define('JPATH_BASE', dirname(dirname(__FILE__))); | |
define( 'DS', DIRECTORY_SEPARATOR ); | |
require_once ( JPATH_BASE .DS.'includes'.DS.'defines.php' ); | |
require_once ( JPATH_BASE .DS.'includes'.DS.'framework.php' ); | |
$mainframe =& JFactory::getApplication('site'); | |
$mainframe->initialise(); | |
jimport('joomla.application.component.model'); |