Skip to content

Instantly share code, notes, and snippets.

View simonharrer's full-sized avatar
🏠
Mob Programming from my Home Office

Dr. Simon Harrer simonharrer

🏠
Mob Programming from my Home Office
View GitHub Profile
@syamn
syamn / .ebextension-lets-encrypt.yaml
Created July 23, 2016 13:51
Let's Encrypt your Elastic Beanstalk single instance!
Resources:
sslSecurityGroupIngress:
Type: AWS::EC2::SecurityGroupIngress
Properties:
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
IpProtocol: tcp
ToPort: 443
FromPort: 443
CidrIp: 0.0.0.0/0
@RameshRM
RameshRM / BackgroundFetch.swift
Last active March 8, 2022 14:36
Swift Background Fetch
Step 1: Enable capabilities "background fetch"
Step2 : Setup AppDelegate.swift
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let settings = UIUserNotificationSettings(forTypes: UIUserNotificationType.Alert, categories: nil)
UIApplication.sharedApplication().registerUserNotificationSettings(settings)
UIApplication.sharedApplication().setMinimumBackgroundFetchInterval(UIApplicationBackgroundFetchIntervalMinimum)
return true;
@Mic92
Mic92 / deploy.rb
Created September 5, 2012 20:15
My mina deploy setup
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rbenv'
# Basic settings:
# domain - The hostname to SSH to
# deploy_to - Path to deploy into
# repository - Git repo to clone from (needed by mina/git)
# user - Username in the server to SSH to (optional)
@hstaudacher
hstaudacher / junit4-templates.xml
Created March 20, 2012 11:20
JUnit4 Templates for Eclipse
<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="java" deleted="false" description="" enabled="true" name="setup">${:import(org.junit.Before)}
@Before
public void setUp() {
${cursor}
}</template><template autoinsert="true" context="java" deleted="false" description="" enabled="true" name="teardown">${:import(org.junit.After)}
@After
public void tearDown() {
${cursor}
}</template><template autoinsert="false" context="java-members" deleted="false" description="test method" enabled="true" id="org.eclipse.jdt.ui.templates.test" name="test">${:import(org.junit.Test)}
@Test
@dhh
dhh / gist:1014971
Created June 8, 2011 18:09
Use concerns to keep your models manageable
# autoload concerns
module YourApp
class Application < Rails::Application
config.autoload_paths += %W(
#{config.root}/app/controllers/concerns
#{config.root}/app/models/concerns
)
end
end
anonymous
anonymous / gist:789131
Created January 21, 2011 02:11
~/projects/jruby ➔ cat my_java_thing.rb
require 'java'
java_package 'foo.bar'
class SomeJavaThing
java_signature 'void main(String[] args)'
def self.main(args)
puts args.to_a
end