This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
var fs = require('fs'); | |
var outfile = "primes.txt"; | |
var count = 0; | |
var maxCount = 100; | |
var primes = []; | |
var i = 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.gray { | |
-webkit-filter: grayscale(100%); | |
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter id=\'grayscale\'><feColorMatrix type=\'matrix\' values=\'0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); /* Firefox 10+, Firefox on Android */ | |
-ms-filter: grayscale(100%); | |
-o-filter: grayscale(100%); | |
filter: gray; /* IE 6-9 */ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# chmod +x initial_setup.sh | |
# sudo ./initial_setup.sh | |
sudo apt-get install dconf-tools | |
# Themes | |
mkdir ~/.themes | |
## Living closer to the edge! Replace source list from testing to unstable (SID) ## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ipad: "only screen and (min-width: 569px) and (max-width: 1024px)"; | |
$ipad-l: "only screen and (min-width: 769px) and (max-width: 1024px)"; | |
$ipad-p: "only screen and (min-width : 481px) and (max-width : 768px)"; | |
$iphone: "only screen and (min-width: 320px) and (max-width: 568px)"; | |
$iphone-l:"only screen and (min-width: 321px) and (max-width: 568px)"; | |
$iphone-p: "only screen and (max-width: 320px)"; | |
$desktop: "only screen and (min-width: 1224px)"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
"Enable filetypes | |
filetype on | |
filetype plugin on | |
filetype indent on | |
syntax on | |
"Write the old file out when switching between files. | |
set autowrite |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// /Illuminate/Support/helpers.php | |
echo app_path(); | |
echo base_path(); | |
echo public_path(); | |
echo storage_path(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function curl_fetch ( $id, $since ) { | |
/*** Twitter Api v1.1 ***/ | |
$url = "https://api.twitter.com/1.1/statuses/user_timeline.json"; | |
$count = $this->_app->count; | |
$sinceUrl = $since != false ? "&since_id={$since}" : ''; | |
$oauth_access_token = $this->_app->oauth_access_token; | |
$oauth_access_token_secret = $this->_app->oauth_access_token_secret; | |
$consumer_key = $this->_app->consumer_key; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function(file, index){ | |
var url = module.attr('data-upload'); | |
var xhr = new XMLHttpRequest(), | |
formData = new FormData(), | |
previewImage, | |
img; | |
xhr.upload.addEventListener("progress", function (event) { | |
$progress.stop().css('width', 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
document.getElementById... | |
.onclick = function() { sendHTTPRequest(); }; | |
var httpRequest; | |
function sendHTTPRequest() { | |
if (window.XMLHttpRequest) { // Mozilla, Safari, ... | |
httpRequest = new XMLHttpRequest(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function removeElement(node) { | |
if (node.parentNode) { | |
node.parentNode.removeChild(node); | |
} | |
} |
OlderNewer