Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Strong Opinions Weakly Held

Ali Moeeny alimoeeny

💭
Strong Opinions Weakly Held
View GitHub Profile
View VSCode_Settings.json
{
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"editor.fontFamily": "Monoid, Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": true,
"editor.fontSize": 14,
@alimoeeny
alimoeeny / AWSBillingPermissions.json
Created May 18, 2020
AWS IAM Billing permissions
View AWSBillingPermissions.json
{
"Statement": [
{
"Action": [
"budgets:ViewBudget",
"cloudwatch:DescribeAlarmHistory",
"cloudwatch:GetDashboard",
"cloudwatch:GetMetricData",
"cloudwatch:DescribeAlarmsForMetric",
"cloudwatch:ListDashboards",
View FLBuilder.cs
#if (UNITY_EDITOR)
using UnityEngine;
using UnityEditor;
using System.Collections;
using System.Collections.Generic;
using System.IO;
public static class FLBuilder {
static string GetProjectName() {
string[] s = Application.dataPath.Split('/');
View NormalInvert.shader
// <copyright file="InsideShader.cs" company="Google Inc.">
// Copyright (C) 2016 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
View sample.swift
var window: UIWindow?
var sideMenuViewController: RESideMenu?
var rootTabVC: UITabBarController?
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// about
var about : AboutViewController = AboutViewController(nibName: "AboutView_iphone", bundle: nil)
about.title = "About"
View brew gcc errors
This file has been truncated, but you can view the full file.
brew install -v gcc 2>&1
==> Downloading http://ftpmirror.gnu.org/gcc/gcc-4.9.1/gcc-4.9.1.tar.bz2
Already downloaded: /Library/Caches/Homebrew/gcc-4.9.1.tar.bz2
==> Verifying gcc-4.9.1.tar.bz2 checksum
tar xf /Library/Caches/Homebrew/gcc-4.9.1.tar.bz2
==> Patching
==> ../configure --build=x86_64-apple-darwin14.0.0 --prefix=/usr/local/Cellar/gcc/4.9.1_1 --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-4.9 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-cloog=/usr/local/opt/cloog --with-isl=/usr/local/opt/isl --with-system-zlib --enable-version-specific-runtime-libs --enable-libstdcxx-time=yes --enable-stage1-checking --enable-checking=release --enable-lto --disable-werror --with-pkgversion=Homebrew gcc 4.9.1_1 --with-bugurl=https://github.com/Homebrew/homebrew/issues --enable-plugin --disable-nls --enable-multilib
checking build system type... x86_64-apple-darwin14.0.0
checking host system type... x86_64-apple-darwin14.0.0
@alimoeeny
alimoeeny / emptyjson.go
Created Aug 11, 2014
Empty things in json
View emptyjson.go
package main
import (
"encoding/json"
"fmt"
)
type Book struct {
Title string `json:"title,omitempty"`
Author string `json:"author,omitempty"`
View AutoVersionIncreament.sh
#!/bin/bash
# Auto Increment Version Script
# Make sure you have or create CFBuildNumber and CFBuildVersion in your info.plist
buildPlist="FlowHealth/FlowHealth-Info.plist"
buildVersion=$(/usr/libexec/PlistBuddy -c "Print CFBuildVersion" $buildPlist)
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBuildNumber" $buildPlist)
buildNumber=$(($buildNumber + 1))
/usr/libexec/PlistBuddy -c "Set :CFBuildNumber $buildNumber" $buildPlist
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildVersion.$buildNumber" $buildPlist
View AddMeToELB.sh
#register this with ELB
# what is my name
myname=$(curl http://169.254.169.254/latest/meta-data/instance-id)
# what is my AvailabilityZone
myaz=$(curl http://169.254.169.254/latest/meta-data/placement/availability-zone)
#What is my region
myregion=${myaz%?}
View master.vim
" copy all this into a vim buffer, save it, then...
" source the file by typing :so %
" Now the vim buffer acts like a specialized application for mastering vim
" There are two queues, Study and Known. Depending how confident you feel
" about the item you are currently learning, you can move it down several
" positions, all the way to the end of the Study queue, or to the Known
" queue.
" type ,, (that's comma comma)