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
import dns.resolver | |
input_domains = [ | |
"1.com", | |
"2.com", | |
"3.com", | |
"etc.com", | |
] | |
for domain in input_domains: |
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
def originalNumbers = [6,3,5,4,2] | |
def ops = ['x', '-', '-', '+'] | |
def target = 21 | |
def combine(a, b, op) { | |
if(op == '+') { | |
return a + b | |
} | |
else if (op == '-') { | |
return a - b |
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
{ | |
"apiKey": "your-API-Key", | |
"payload": { | |
"message":"Hi people!", | |
"recipients":[ | |
{ "type":"mobile", "value":"+1234567890" } | |
] | |
} | |
} |
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
class AddsToAHundred { | |
/* | |
Challenge: Write a program that outputs all possibilities | |
to put + or - or nothing between the numbers 1, 2, ..., 9 (in this order) | |
such that the result is always 100. For example: 1 + 2 + 34 – 5 + 67 – 8 + 9 = 100. | |
from https://blog.svpino.com/2015/05/07/five-programming-problems-every-software-engineer-should-be-able-to-solve-in-less-than-1-hour | |
*/ | |
public static void main(String [] args) { |
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 //FILE: sms_api.php | |
function sendSMS($number, $message) { | |
$url = "example"; // Set your frontlinesms or frontlinecloud webconnection url here | |
$secret = "secret"; // Set the secret here | |
$request = array( | |
'secret' => $secret, | |
'message' => $message, | |
'recipients' => array(array( |
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
import org.codehaus.groovy.grails.web.context.ServletContextHolder as SCH | |
modules = { | |
core { | |
resource url: '/resources/css/app.css', disposition: 'head' | |
resource url: '/resources/css/myapp.css', disposition: 'head' | |
resource url: '/extjs/ext-all-debug.js', dispostion: 'head' | |
getFilesForPath('/app').each { | |
resource url: it |