Skip to content

Instantly share code, notes, and snippets.

View msadoon's full-sized avatar
:shipit:

Mubarak Sadoon msadoon

:shipit:
  • Toronto, ON
View GitHub Profile
@msadoon
msadoon / habitual_privacy_policy_2025.txt
Last active September 3, 2025 17:08
Habitual: Goal Tracker Privacy Policy
The Habitual: Goal Tracker iOS app does not collect any user data of any kind. The app does not access the Internet at all.
There is no login at this time, all storage is done locally on the phone.
#!/usr/bin/env ruby
if ARGV.include?("-h") || ARGV.include?("--help")
puts "USAGE: check.rb [HOSTNAME] [TLS_VERSION] [VERIFY]"
puts " default: check.rb rubygems.org auto VERIFY_PEER"
puts " example: check.rb github.com TLSv1_2 VERIFY_NONE"
exit 0
end
host = ARGV.shift || "rubygems.org"
@msadoon
msadoon / viewframechange.swift
Created October 30, 2016 21:20
UIView Frame Animation
let newFrame = CGRect(x:self.frame.origin.x, y: self.frame.origin.y, width:self.frame.size.width, height:((self.frame.size.height*2) + heightDiff));
let scale:CABasicAnimation = CABasicAnimation.init(keyPath:"path");
print("newFrame: \(newFrame)");
scale.timingFunction = CAMediaTimingFunction(name: kCAMediaTimingFunctionEaseInEaseOut);
scale.fromValue = self.frame;
scale.toValue = newFrame;
scale.duration = 1.0;
scale.isRemovedOnCompletion = false;
scale.fillMode = kCAFillModeForwards;
scale.delegate = self;
@msadoon
msadoon / angular.js
Created October 24, 2014 00:56
angular.js
var bugSummaryApp = angular.module('bugSummaryApp', []);
bugSummaryApp.factory('bugFactory', function($http) {
var webserviceURL = "/invokeWebService?webserviceHost=http://trceit-dev-env.elasticbeanstalk.com:8080&webservicePathURL=/getData";
var filteredResponse = [];
var bugFactory = {
async: function() {
var promise = $http.get(webserviceURL).then(function (response) {
angular.forEach(response.data, function(bug)
@msadoon
msadoon / angular.html
Created October 23, 2014 23:34
html with angular.
<div class="col-md-6 detailscroll" id="bugtable">
<table class="table list-group-item">
<thead>
<tr>
<th>#### <br> Bug Summary {{data.bug}}- documented</th>
</tr>
</thead>
<tbody>
<tr>
<th>
@msadoon
msadoon / angular.js
Created October 23, 2014 23:27
angular issues
var bugSummaryApp = angular.module('bugSummaryApp', []);
bugSummaryApp.factory('bugFactory', function($http) {
var webserviceURL = "/invokeWebService?webserviceHost=http://trceit-dev-env.elasticbeanstalk.com:8080&webservicePathURL=/getData";
var bugFactory = {
async: function() {
var promise = $http.get(webserviceURL).then(function (response) {
@msadoon
msadoon / angular.js
Last active August 29, 2015 14:08
Unknown provider: $scopeProvider <- $scope <- BugService
<script>
var bugSummaryApp = angular.module('bugSummaryApp', []);
var bugslist = null;
var bugdetails = null;
bugSummaryApp.factory("BugService", ['$http', function(http) {
var webserviceURL = "/invokeWebService?webserviceHost=http://trceit-dev-env.elasticbeanstalk.com:8080&webservicePathURL=/getData";
http.get(webserviceURL).success(function(data) {
@msadoon
msadoon / cheques.js.coffee
Created July 7, 2014 02:11
why won't my coffeescript fire?
$("#cheque_delete").hover ->
window.alert "calls method"
class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception
helper_method :current_user
before_action :require_login
private
def require_login
@msadoon
msadoon / fillable_pdf_form.rb
Created July 2, 2014 00:16
Retrieve template_path for PDFTK
class FillablePdfForm
attr_writer :template_path
attr_reader :attributes
def initialize
fill_out
end
def export(output_file_path=nil, tenantname)