cron.sh:
#!/bin/bash
curl http://localhost/related.php &
curl http://localhost/artist_rank.php &
curl http://localhost/sitemap.php &
<?php | |
function create_csl($length = 3,$comparison_operator = '>') | |
{ | |
$fn = ''; | |
$i = 0; | |
while(true) | |
{ | |
if($i == 0) | |
{ |
cron.sh:
#!/bin/bash
curl http://localhost/related.php &
curl http://localhost/artist_rank.php &
curl http://localhost/sitemap.php &
<?php | |
namespace UserFrosting\Util; | |
trait ArraySingleton | |
{ | |
protected $data = []; | |
protected $defaults = []; | |
private static $instance = null; | |
<select name="year"> | |
<option value="">Not Selected</option> | |
{% for i in range(19,20) %} | |
{%for j in range(0,9) %} | |
{% for k in range (0,9) %} | |
{% set y %}{{i}}{{j}}{{k}}{%endset%} | |
{% if y <= "now"|date('Y') %} | |
<option value="{{y}}">{{y}}</option> | |
{% endif %} | |
{% endfor %} |
No media queries are used Since tablets and mobiles are now displaying huge resolutions, if we think its mobile, the body gets a class of .m
, if we think its a tablet, it gets a class of .t
.
if its neither mobile nor tablet,it gets .d
unless the screen is wider than 1920px, then it gets .hd
.col
.m-{desired size}
eg .m-12
.t-{desired size}
eg .t-6
.d-{desired size}
eg .d-4
.hd-{desired size}
eg .hd-2
.col
). extras .row
, .container
, .container.fluid
.{size}-hide
to hide eg .m-hide
would hide for mobile.angular | |
.module('myApp') | |
.factory('$db',['$firebaseObject','$firebaseArray','$q',function($firebaseObject,$firebaseArray,$q){ | |
function $db( type, id ){ | |
var ref = firebase.database().ref(type).child(id); | |
var obj = $firebaseObject(ref); | |
return $q(function(resolve,reject){ | |
obj.$loaded().then(function(){ | |
resolve(obj); |
const random_password = (len=64) => { | |
let chars='abcdefghijklmnopqrstuvwxyz123456789-_=+`~:;>,.<}{[]|)(*&^%$#@!'; | |
let password = ''; | |
while(password.length < len) { | |
password+= chars.charAt(Math.floor((Math.random() * chars.length) + 1) % chars.length); | |
} | |
return password; | |
}; |
1. go to http://dl.hhvm.com/ubuntu/pool/main/h/hhvm/ and right click and copy the link to the version of hhvm you want to rollback to | |
2. sudo apt-get autoremove hhvm -y | |
3. wget <link you just copied> | |
4. sudo dpkg -i <name of file u just downloaded> | |
5. apt-get install -f | |
6. service hhvm start | |
Edit: Don't worry when it errors out on step 4. that is expected. just continue to step 5. |
/* partial implementation of Function.prototype.bind */ | |
Function.prototype.bind || (Function.prototype.bind = function(/* context[,arg1,arg2...] */) { | |
var fn = this; | |
var args = Array.prototype.slice.call(this,arguments);//preset args | |
var context = args.shift() || undefined; | |
return function(){ | |
var args2 = args.concat( Array.prototype.slice.call(arguments) );//spec states any passed args should be appended to preset arguments. | |
return fn.apply(context,args2); | |
}; | |
}); |
const animateable = (a) => { | |
a.prototype.quad = function(x){ | |
return x ** 2 | |
}; | |
a.prototype.linear = function(x){ | |
return x; | |
}; | |
a.prototype.animate = function({ duration=300, ease=this.quad, start, end, onUpdate, onComplete=()=>{}}){ |