Skip to content

Instantly share code, notes, and snippets.

@mixin cssSprite( $spriteVals ) {
width: nth( $spriteVals, 1 );
height: nth( $spriteVals, 2 );
background-repeat: no-repeat;
background-image: url( #{ nth( $spriteVals, 3 ) } );
background-position: nth( $spriteVals, 4 ) nth( $spriteVals, 5 );
@media only screen and ( -webkit-min-device-pixel-ratio: 2 ), only screen and ( min-device-pixel-ratio: 2 ) {
background-image: url( #{ nth( $spriteVals, 6 ) } );
background-size: $bgiSizeW $bgiSizeH;
}
diff --git a/app/config/config.yml b/app/config/config.yml
index 74b1729..22a1f94 100644
--- a/app/config/config.yml
+++ b/app/config/config.yml
@@ -246,21 +246,21 @@ ano_media:
user_image:
provider: local
formats:
- small: { width: 50, height: 50 }
- medium: { width: 100, height: 100 }
diff --git a/src/Nous/FollowBundle/Repository/FollowRepository.php b/src/Nous/FollowBundle/Repository/FollowRepository.php
index 93fdb5b..9de0b0b 100644
--- a/src/Nous/FollowBundle/Repository/FollowRepository.php
+++ b/src/Nous/FollowBundle/Repository/FollowRepository.php
@@ -157,4 +157,23 @@ class FollowRepository extends EntityRepository
return $pager;
}
+
+ public function getFollowingIdsForUser(User $user)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
function get_result(callback) {
fetch_something_from_network().complete(callback);
}
app.get('/longpolling', function(req, res){
get_result(function(error, result){
res.send(result, error && 400 || 200);
});
});
diff --git a/AFNetworking/AFHTTPRequestOperation.m b/AFNetworking/AFHTTPRequestOperation.m
index bc3ca48..a97bcbf 100644
--- a/AFNetworking/AFHTTPRequestOperation.m
+++ b/AFNetworking/AFHTTPRequestOperation.m
@@ -147,6 +147,7 @@ static inline BOOL AFHTTPOperationStateTransitionIsValid(AFHTTPOperationState fr
}
- (void)dealloc {
+ NSLog(@"Deallocing ...... %@", [self class]);
[_runLoopModes release];
@sandosh
sandosh / gist:959969
Created May 6, 2011 23:06
Underscore.js - compact an object just like compact function for array
_.mixin({
capitalize : function(string) {
return string.charAt(0).toUpperCase() + string.substring(1).toLowerCase();
},
compactObject: function(to_clean) {
_.map(to_clean, function(value, key, to_clean) {
if (_.isNull(value) || _.isUndefined(value) || (_.isString(value) && _.trim(value).length === 0) || (_.isBoolean(value) && value === false)) {
delete to_clean[key];
}
});
`//Lab.js
(function(p){var q="string",w="head",L="body",M="script",u="readyState",j="preloaddone",x="loadtrigger",N="srcuri",E="preload",Z="complete",y="done",z="which",O="preserve",F="onreadystatechange",ba="onload",P="hasOwnProperty",bb="script/cache",Q="[object ",bw=Q+"Function]",bx=Q+"Array]",e=null,h=true,i=false,k=p.document,bc=p.location,bd=p.ActiveXObject,A=p.setTimeout,be=p.clearTimeout,R=function(a){return k.getElementsByTagName(a)},S=Object.prototype.toString,G=function(){},r={},T={},bf=/^[^?#]*\//.exec(bc.href)[0],bg=/^\w+\:\/\/\/?[^\/]+/.exec(bf)[0],by=R(M),bh=p.opera&&S.call(p.opera)==Q+"Opera]",bi=("MozAppearance"in k.documentElement.style),bj=(k.createElement(M).async===true),v={cache:!(bi||bh),order:bi||bh||bj,xhr:h,dupe:h,base:"",which:w};v[O]=i;v[E]=h;r[w]=k.head||R(w);r[L]=R(L);function B(a){return S.call(a)===bw}function U(a,b){var c=/^\w+\:\/\//,d;if(typeof a!=q)a="";if(typeof b!=q)b="";d=((/^\/\//.test(a))?bc.protocol:"")+a;d=(c.test(d)?"":b)+d;return((c.test(d)?"":(d.charAt(0)==="/"?bg
javascript:(function()%20{var%20something;something%20=%20function()%20{var%20d,%20domain,%20domainSrc,%20html,%20iframe;iframe%20=%20document.createElement(%27iframe%27);iframe.style.width%20=%20%27500px%27;iframe.style.height%20=%20%27400px%27;document.body.appendChild(iframe);try%20{iframe.contentWindow.document.open;}%20catch%20(error)%20{domain%20=%20document.domain;domainSrc%20=%20%22javascript:var%20d=document.open();d.domain=%27%22%20+%20domain%20+%20%22%27;%22;iframe[src]%20=%20domainSrc%20+%20%22void(0);%22;}html%20=%20function()%20{return%20[%27<body%20onload=%22var%20d=document;%20%27,%20%22d.getElementsByTagName(%27head%27)[0].appendChild(d.createElement(%27script%27)).src=%27http://sandosh.info/media2/iframe.js%27;%22,%20%27%22%27,%20%27%27,%20%27></body>%27].join(%27%27);};try%20{d%20=%20iframe.contentWindow.document;d.write(html());return%20d.close();}%20catch%20(error)%20{return%20iframe[src]%20=%20domainSrc%20+%20%27d.write(%22%27%20+%20html().replace(/%22/g,%20%27\\%22%27)%20+%20%27%22);d.c
(function(variable) { return variable !== false && true })();
> true
(function(variable) { return variable !== false && true })(false);
> false
(function(variable) { return variable !== false && true })();
> true
(function(variable) { return variable !== false && true })(true);
> true