View binary_dsym_plist_gen.rb
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
require 'fileutils' | |
require 'optimist' | |
require 'plist' | |
def run(path, source_path) | |
process(path, source_path, '**/*.app', true) | |
process(path, source_path, '**/*.dylib', false) | |
end | |
def process(path, source_path, search_pattern, is_app) |
View FontAwesomeIcon.cs
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
public static class FontAwesomeIcon | |
{ | |
public static string Ad = "f641"; | |
public static string AddressBook = "f2b9"; | |
public static string AddressCard = "f2bb"; | |
public static string Adjust = "f042"; | |
public static string AirFreshener = "f5d0"; | |
public static string AlignCenter = "f037"; | |
public static string AlignJustify = "f039"; | |
public static string AlignLeft = "f036"; |
View GithubRedux.js
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 { createReducer, createActions } from 'reduxsauce' | |
import Immutable from 'seamless-immutable' | |
/* ------------- Types and Action Creators ------------- */ | |
const { Types, Creators } = createActions({ | |
userRequest: ['username'], | |
userSuccess: ['avatar'], | |
userFailure: null | |
}) |
View switch_user.php
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 | |
/** | |
* Login as another user in SugarCRM and switch back to admin user | |
* | |
* Simply put this file into a custom entry point file and | |
* browse to it with the parameters 'user_name' or 'back_to_sudo' | |
* | |
* Usage: | |
* http://xxxxxxxxx/index.php?entryPoint=my_awesome_entry_point&user_name=mylittlepony | |
* http://xxxxxxxxx/index.php?entryPoint=my_awesome_entry_point&back_to_sudo=1 |
View gist:2f63373b5a28b8126695
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" ?> | |
<PtsSubscriberDataFormat> | |
<OldFile>Teleop_changes_20141104.xml</OldFile> | |
<NewFile>Teleop_changes_20141105.xml</NewFile> | |
<Subscription Teladdress="075-1621000" Type="Mob" TransactionType="NYAB" Updated=”20141105” | |
Subscriberchoice=”yes”> | |
<OwnerData Id="5568466154" Type="org"> | |
<Company>VIQ Sweden AB</Company> | |
<Addresses> | |
<Address TelSite="yes"> |
View gist:7e261291b6b014f6a959
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
# Working: | |
def create | |
@form = SongForm.new(Song.new) | |
respond_to do |format| | |
if @form.validate(params[:song]) | |
@form.save do |data, nested| | |
Song.create(nested) | |
end | |
format.html { redirect_to @form, notice: 'Song was successfully created.' } | |
format.json { render :show, status: :created, location: @form } |
View gist:10274264
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
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
ServerName sugarcrm7.localhost.com | |
ErrorLog /var/log/apache2/sugarcrm7_error_log | |
DocumentRoot /home/karlingen/Desktop/public_html/sugarcrm7/ | |
<Directory /> | |
Options FollowSymLinks | |
AllowOverride all | |
</Directory> |
View gist:9935531
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 | |
$permissions = ACLField::hasAccess($field, $module, $GLOBALS['current_user']->id, $is_owner); | |
switch ( $permissions ) { | |
case 0: | |
echo "No access to this field"; | |
break; | |
case 1: | |
echo "Read-only access to this field"; | |
break; |
View install_vagrant_sudoers.sh
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
#!/bin/bash | |
# Add Vagrant's NFS setup commands to sudoers, for `vagrant up` without a password | |
# Updated to work with Vagrant 1.3.x | |
# Stage updated sudoers in a temporary file for syntax checking | |
TMP=$(mktemp -t vagrant_sudoers) | |
cat /etc/sudoers > $TMP | |
cat >> $TMP <<EOF | |
# Allow passwordless startup of Vagrant when using NFS. |
View class_i18n.php
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 | |
/** | |
* I18N class for translating text to any language | |
* Uses YAML files | |
* | |
* Usage: I18N::t("user.name") # => "Karl Metum" | |
* In the above example "name" is nested under "user" | |
* | |
* Make sure that the following constants are set in | |
* your configuration file: |
NewerOlder