Skip to content

Instantly share code, notes, and snippets.

:octocat:
Rust > C++ > Go > TypeScript > C

Samuel Marks SamuelMarks

:octocat:
Rust > C++ > Go > TypeScript > C
Block or report user

Report or block SamuelMarks

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:ac8440d1678e1084cdda1e0d67090324
tttttt$ ls
CMakeLists.txt conanfile.txt main.cpp
tttttt$ mkdir build && cd $_
tttttt/build$ conan install ..
RapidJSON/1.0.2@SamuelMarks/testing: Not found, looking in remotes...
RapidJSON/1.0.2@SamuelMarks/testing: Trying with 'conan.io'...
Downloading conan_export.tgz
[==================================================]
Downloading conanfile.py
[==================================================]
View httpPOST.js
var http = require('http');
function httpPOST(options, body, cb) {
const req = http.request(options, function (res) {
if (!res)
return cb(res);
else if ((res.statusCode / 100 | 0) > 3)
return cb(res);
return cb(null, res);
View http_post.js
"use strict";
var http_1 = require('http');
function httpF(method) {
return function (options, body_or_cb, cb) {
if (!cb) {
cb = body_or_cb;
body_or_cb = null;
}
options['method'] = method;
if (body_or_cb)
View gist:dedd863742f90cf2f333
mongoose.connect = MongooseThenable {
connections:
[ NativeConnection {
base: [Object],
collections: {},
models: {},
config: [Object],
replica: false,
hosts: null,
host: '192.168.2.2',
@SamuelMarks
SamuelMarks / diff -r example2 generator-m-ionic-demo
Created Jan 6, 2016
diff -r example2 generator-m-ionic-demo
View diff -r example2 generator-m-ionic-demo
diff -r example2/.yo-rc.json generator-m-ionic-demo/.yo-rc.json
4,6c4,6
< "appName": "example2",
< "appId": "com.company.example2",
< "ionicCss": false,
---
> "appModule": "myProject",
> "appName": "My Project",
> "appId": "com.company.project",
12a13
View gist:a0965c56079610cbedca
/tmp/a$ gulp karma
[16:05:10] Using gulpfile /tmp/a/gulpfile.js
[16:05:10] Starting 'eslint'...
[16:05:10] Starting 'jsonlint'...
[16:05:11] Finished 'jsonlint' after 294 ms
[16:05:11] Finished 'eslint' after 450 ms
[16:05:11] Starting 'linting'...
[16:05:11] Finished 'linting' after 12 μs
[16:05:11] Starting 'karma'...
29 12 2015 16:05:11.367:WARN [watcher]: Pattern "/tmp/a/app/**/templates/*.html" does not match any file.
View split_session.py
#!/usr/bin/env python
import json
from sys import argv
from os import path
with open(argv[1]) as f:
s = f.readlines()
session = json.loads(s[4])
@SamuelMarks
SamuelMarks / CMakeLists.txt
Created Nov 17, 2015
phc-winner-argon2 CMake
View CMakeLists.txt
cmake_minimum_required(VERSION 3.3)
project(phc_winner_argon2)
set(SOURCE_FILES
src/argon2.c src/core.c src/blake2/blake2b.c src/thread.c src/encoding.c)
set(SRC_RUN src/run.c)
set(SRC_BENCH src/bench.c)
set(SRC_GENKAT src/genkat.c)
set(RUN argon2)
@SamuelMarks
SamuelMarks / cloud.md
Last active Aug 29, 2015
Docker cloud: PaaS, orchestration, resource-sharing, provisioning
View cloud.md

Experimenting with Docker technologies and related supporting infrastructure, as I'm sure many of you are.

Disclaimer: seeking an opinionated architecture, not a wiki (like: https://github.com/veggiemonk/awesome-docker)

In essence, I am building an open-source cloud that:

  • fans-in/out elastically

  • supports multiple public and private cloud providers

@SamuelMarks
SamuelMarks / upgrade_all_pip_packages.py
Last active Feb 8, 2016
Upgrade all packages using pip
View upgrade_all_pip_packages.py
#!/usr/bin/env python
from __future__ import print_function
from sys import stderr
from pip import get_installed_distributions
from pip.commands import install
from pip.exceptions import InstallationError
You can’t perform that action at this time.