Skip to content

Instantly share code, notes, and snippets.

View abhaytalreja's full-sized avatar
🤩
Working on Something Amazing!

Abhay Talreja abhaytalreja

🤩
Working on Something Amazing!
View GitHub Profile
@abhaytalreja
abhaytalreja / markdown.md
Created February 2, 2020 16:19
Markdown code for the youtube video Video - Blog Post -

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
@abhaytalreja
abhaytalreja / error
Last active July 5, 2016 20:38
ReactNative-Realm
commit_log.cpp:584: [realm-core-1.1.2] Assertion failed: to_version <= preamble->end_commit_range [10, 1]
0 App 0x0000000101ca5345 _ZN5realm4util18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 40
1 App 0x0000000101c1ffd2 _ZN5realm4util9terminateIJyyEEEvPKcS3_lDpT_ + 1634
2 App 0x0000000101dfcd81 _ZNK5realm5_impl17WriteLogCollector27get_commit_entries_internalINS_10BinaryDataEEEvyyPT_ + 585
3 App 0x0000000101a6ef34 _ZN5realm5_impl20ChangesetInputStream10next_blockERPKcS4_ + 212
4 App 0x0000000101a478c5 _ZN5realm5_impl17TransactLogParser17next_input_bufferEv + 53
5 App 0x0000000101a45e40 _ZN5realm5_impl17TransactLogParser8has_nextEv + 48
6 App 0x0000000101d6cf8a _ZN5realm5_impl17TransactLogParser5parseINS_5Group16TransactAdvancerEEEvRNS0_17NoCopyInputStreamERT_ + 54
7 Ap
@abhaytalreja
abhaytalreja / app.js
Last active August 29, 2015 14:23
Mean io - Working with Agenda and creating scheduled batch jobs
//In the app.js add the below lines to inject the dependency for batch job as well as calling the jobs.
var jobSchedule = require('./job-schedule.js');
jobSchedule.setupJobs();
// make use of "Sorted set".
// Create a set for every day, In that set, key should be UserId and its value should be count of hits.
Use ZINCRBY key increment member to update user's hit count.
Using ZSCORE key member you can get particular users hit count.
// Make sure you have the jquery plugin installed too.
modules={
application {
resource url: 'js/jquery.timeago.js'
}
}
/* before */
@font-face {
font-family: 'FontAwesome';
src: url('../fonts/fontawesome-webfont.eot?v=4.0.3');
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'), url('../fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}
?_debugResources=y
For example:
http://localhost:8080/myapp/main?_debugResources=y
@abhaytalreja
abhaytalreja / GrailsTypeConversionExamples
Created September 26, 2013 23:36
This is just a simple file for type conversions in Grails.
class SimpleController {
def submit = {
def intValue = params.int('paramInt')
def shortValue = params.short('paramShort')
def byteValue = params.byte('paramByte')
def longValue = params.long('paramLong')
def doubleValue = params.double('paramDouble')
def floatValue = params.float('paramFloat')
def booleanValue = params.boolean('paramBoolean')
[ intValue: intValue, shortValue: shortValue,
@abhaytalreja
abhaytalreja / .gitignore
Last active December 23, 2015 20:39
Git Ignore
*.iws
*Db.properties
*Db.script
.settings
stacktrace.log
@abhaytalreja
abhaytalreja / fontSize.css
Created March 16, 2013 22:49
Twitter Bootstrap Font Size on Website's, very simple and easy to use.
.font-size-small {
font-size: 0.8em;
}
.font-size-medium {
font-size: 0.9em;
}
.font-size-large {
font-size: 1.0em;