Skip to content

Instantly share code, notes, and snippets.

View amolc's full-sized avatar
🎯
Focusing

Amol amolc

🎯
Focusing
View GitHub Profile
@amolc
amolc / Screener strategy
Created September 30, 2021 02:44 — forked from ugik/Screener strategy
Backtrader screener strategy
# Create a Stratey
class TestStrategy(bt.Strategy):
params = (
('maperiod', 20),
)
def log(self, txt, optimization=False, dt=None):
if optimization:
return
@amolc
amolc / pushCertification.txt
Last active June 6, 2016 13:10 — forked from kublaios/gist:f01cdf4369c86ddd6d71
Making a PEM File for iOS Push Notifications (From Ray Wenderlich's tutorial)
# Convert the .cer file into a .pem file:
$ openssl x509 -in aps_development.cer -inform der -out PushChatCert.pem
# Convert the private key’s .p12 file into a .pem file:
$ openssl pkcs12 -nocerts -in PushChatKey.p12 -out PushChatKey.pem
# Finally, combine the certificate and key into a single .pem file
$ cat PushChatCert.pem PushChatKey.pem > ck.pem
# At this point it’s a good idea to test whether the certificate works.
/* global angular */
/**
* https://gist.github.com/mlynch/dd407b93ed288d499778
*
* the HTML5 autofocus property can be finicky when it comes to dynamically
* loaded templates and such with AngularJS. Use this simple directive to tame
* this beast once and for all.
*
* Usage:
* <input type="text" autofocus>
@amolc
amolc / rest_api.js
Created December 29, 2013 14:30 — forked from erichonorez/rest_api.js
Simple Rest API
/**
* TaskRepository class deals with task persistence
*/
function TaskRepository() {
this.tasks = [];
this.nextId = 1;
}
/**
* Find a task by id
* Param: id of the task to find
@amolc
amolc / vptest.info
Created March 14, 2012 03:24 — forked from voxpelli/vptest.info
OAuth.module 3.x example - a test I made to verify the D7 port of the module - should work well on D6 as well though
name = VoxPelli OAuth Test
core = 7.x
dependencies[] = oauth_common
dependencies[] = http_client