This file contains 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 | |
$opts = array( | |
'http'=>array( | |
'method'=>"GET", | |
'header'=>"x-referrer: " . $_SERVER['HTTP_REFERER'] . " \r\n" | |
) | |
); | |
$postal_code = strip_tags(htmlspecialchars($_POST['postalcode'], ENT_QUOTES)); |
This file contains 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
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var concat = require('gulp-concat'); | |
gulp.task('sass', function () { | |
gulp.src(['./css/theme.scss']) | |
.pipe(sass().on('error', sass.logError)) | |
.pipe(concat('theme.css')) | |
.pipe(gulp.dest('./css/compiled/')); | |
}); |
This file contains 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
from math import log | |
def to_decimal(n, base): | |
if n < 10: | |
return n | |
p = int(log(n, 10)) | |
msb = base ** p | |
n -= 10 ** p |
This file contains 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
import os | |
import logging | |
def generate_primes(number): | |
logger = logging.getLogger(str(os.getpid()) + ':logger') | |
for num in range(number + 1): | |
# prime numbers are greater than 1 | |
if num > 1: |
This file contains 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
Hello all you awesome subscribers! | |
Here's the best things I've found in the world of PHP this week! | |
- thing one | |
- thing two | |
- thing three | |
If you like this list, you can help it continue by using this link when you shop at Amazon.com! |
This file contains 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
curl https://zip.getziptastic.com/v3/US/48867 " -H "x-key: 123examplekey456" |
This file contains 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
if [[ $BUILD_STATUS == "success" ]] | |
then | |
export STATUS="success" | |
else | |
export STATUS="failure" | |
fi | |
curl "https://api.github.com/repos/<user/org>/<my_repo>/statuses/$GIT_COMMIT?access_token=<token>" \ | |
-H "Content-Type: application/json" \ | |
-X POST \ |
This file contains 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
$.ajax({ | |
type: "GET", | |
beforeSend: function(request) { | |
request.setRequestHeader("x-key", "123examplekey456"); | |
}, | |
url: "//zip.getziptastic.com/v3/US/48867", | |
success: function(data) { | |
console.log(data[0].city); | |
console.log(data[0].state); | |
console.log(data) |
This file contains 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
import java.util.Scanner; | |
import java.io.*; | |
import java.util.LinkedList; | |
import java.util.Queue; | |
public class BFT { | |
public static boolean[]avail = new boolean [48]; // tells me whether or not a state has been used yet | |
public static int[][] dataSet = new int[48][48]; // prefilled adjacency matrix | |
public static String[] statesList = new String[48]; // prefilled list of states |
This file contains 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/bash | |
sudo yum update -y | |
sudo yum install -y netstat git rubygems gcc kernel-devel make perl | |
sudo yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel maven | |
sudo gem install sass | |
cd /tmp |