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
// Sample code to generate binary string from the integer | |
// To compile, please use: | |
// $ clang++ int2str.cpp --std=c++11 -Weverything -Wno-c++98-compat | |
#include <cmath> | |
#include <cstdio> | |
#include <cstdlib> | |
#include <cstring> | |
#include <ctime> |
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
def APPLICATION_GROUP = 'Application' | |
ext { | |
device = 'Cruzer' | |
program = 'wait' | |
} | |
task compile(type: Exec) { | |
group APPLICATION_GROUP | |
description 'Compiles the native program.' |
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
apply plugin: 'com.android.application' | |
task connect(type: ConnectDevicesTask) { | |
description 'Verifies that any Android device is connected and runs a simulator if not.' | |
} | |
import com.android.ddmlib.AndroidDebugBridge | |
import com.android.ddmlib.IDevice | |
import org.gradle.tooling.BuildException |
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
module.exports = (ctx) => { | |
var Q = ctx.requireCordovaModule('q'), | |
shell = ctx.requireCordovaModule('shelljs'); | |
var gulpDeferral = new Q.defer(), | |
exitDeferral = new Q.defer(); | |
console.log("Building Web Project."); | |
shell.cd('../web/'); |
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
#!/usr/bin/env Rscript | |
suppressPackageStartupMessages(library("argparse")) | |
parser <- ArgumentParser( | |
description="Generate series for a breach detection sample" | |
) | |
parser$add_argument("-N", "--checks", type="integer", default=5, | |
help="Number of checks [default %(default)s]", | |
metavar="checks") | |
parser$add_argument("-M", "--attempts", type="integer", default=6, |
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
#!/usr/bin/env scalas | |
/*** | |
scalaVersion := "2.13.0" | |
scalacOptions ++= Seq("-deprecation", "-feature") | |
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.5.23" | |
libraryDependencies += "com.typesafe.akka" %% "akka-stream" % "2.5.23" | |
libraryDependencies += "com.typesafe.akka" %% "akka-http" % "10.1.9" | |
libraryDependencies += "com.github.scopt" %% "scopt" % "3.7.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
#include <stdio.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <ifaddrs.h> | |
#ifdef AF_LINK | |
# include <net/if_dl.h> | |
unsigned char *get_ptr(struct ifaddrs *ifaptr) { | |
if (((ifaptr)->ifa_addr)->sa_family == AF_LINK) { | |
return (unsigned char *)LLADDR((struct sockaddr_dl *)(ifaptr)->ifa_addr); |
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
#!/usr/bin/env python3 | |
""" Multicasting chat application """ | |
import socket | |
import struct | |
import sys | |
from threading import Thread | |
MADDX = '225.100.100.100' | |
PORT = 6543 |
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
#!/usr/bin/env python3 | |
""" Simple password generator """ | |
import random | |
import argparse | |
def main(): | |
""" Main entry """ | |
parser = argparse.ArgumentParser() |