Skip to content

Instantly share code, notes, and snippets.

View simonoff's full-sized avatar
💭
KUBER!!!!

Oleksandr Simonov simonoff

💭
KUBER!!!!
View GitHub Profile
@simonoff
simonoff / net_http_debug.rb
Created November 17, 2022 10:00 — forked from brainlid/net_http_debug.rb
Enable debug for all Ruby HTTP requests
require 'net/http'
module Net
class HTTP
def self.enable_debug!
class << self
alias_method :__new__, :new
def new(*args, &blk)
instance = __new__(*args, &blk)
instance.set_debug_output($stderr)
instance
@simonoff
simonoff / make.go
Last active August 29, 2015 14:24 — forked from bradrydzewski/make.go
// +build ignore
package main
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"path/filepath"
function countCSSRules() {
var results = '',
log = '';
if (!document.styleSheets) {
return;
}
for (var i = 0; i < document.styleSheets.length; i++) {
countSheet(document.styleSheets[i]);
}
function countSheet(sheet) {
require 'benchmark'
def one
yield 1
end
def a
one { |x| yield x }
end
@simonoff
simonoff / Gemfile
Created May 18, 2014 17:39 — forked from mps/Gemfile
source 'http://rubygems.org'
# Make sure you have bundler installed
# gem install bundler
gem 'shenzhen'
require 'shenzhen'
require 'xcpretty'
require 'cocoapods'
require 'date'
testflight_api_token = "TESTFLIGHT_API_TOKEN"
testflight_team_token = "TESTFLIGHT_TEAM_TOKEN"
workspace_file = "MyWorkspace.xcworkspace"
scheme_name = "MySchemeName"
testflight_distribution_lists = "MY_DISTRIBUTION_LIST"
// Pre-requisites:
// 1. Device core plugin
// 2. Splashscreen core plugin (3.1.0)
// 3. config.xml: <preference name="AutoHideSplashScreen" value="false" />
// 4. config.xml: <preference name="DisallowOverscroll" value="true" />
function onDeviceReady() {
if (parseFloat(window.device.version) >= 7.0) {
document.body.style.marginTop = "20px";
// OR do whatever layout you need here, to expand a navigation bar etc
#!/bin/bash
# https://gist.github.com/949831
# http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/
# command line OTA distribution references and examples
# http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson
# http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution
# http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/
# http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html
#!/bin/bash
# https://gist.github.com/949831
# http://blog.carbonfive.com/2011/05/04/automated-ad-hoc-builds-using-xcode-4/
# command line OTA distribution references and examples
# http://nachbaur.com/blog/how-to-automate-your-iphone-app-builds-with-hudson
# http://nachbaur.com/blog/building-ios-apps-for-over-the-air-adhoc-distribution
# http://blog.octo.com/en/automating-over-the-air-deployment-for-iphone/
# http://www.neat.io/posts/2010/10/27/automated-ota-ios-app-distribution.html

Grunt and Cordova 3

The advantages of using Grunt with Cordova:

  1. It simplifies working with the cordova cli.
  2. It provides a mechanism to copy platform customization to the platforms directory without having to commit the generated plugins and platforms directories to version control.
  3. It provides a way to watch resources and automatically run cordova commands.