Skip to content

Instantly share code, notes, and snippets.

View YetAnotherMinion's full-sized avatar

yam YetAnotherMinion

View GitHub Profile
FROM centos:centos7.2.1511
MAINTAINER YetAnotherMinion <[email protected]>
ENV LIBEVHTP_DL_LOC="https://github.com/ellzey/libevhtp/archive/1.1.6.tar.gz"
ENV LIBZDB_DL_LOC="http://www.tildeslash.com/libzdb/dist/libzdb-2.12.tar.gz"
ENV POSTGRES_REPO="https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-centos95-9.5-2.noarch.rpm"
RUN yum -y --nogpgcheck update
RUN yum -y --nogpgcheck install gcc-4.8.5-4.el7 \
#include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <stdio.h>
int main(int argc, char* argv[])
{
/*shape function gradient copied right out of manual*/
double a = -0.04364916731037106478741094406359479762613773345947265625;
double b = 1.3745966692414821608281272347085177898406982421875;
double c1 = 5.0;
double d = a*b;
double e = b*a;
{
this->field = createField(this->mesh, "dummy", apf::VECTOR, this->mesh->getShape());
apf::zeroField(this->field); /*must zero the field to force writing of data*/
this->D[0][0] = 1e1;
this->D[0][1] = 1e1;
this->D[1][0] = 1e1;
this->D[1][1] = 1e1;
this->D[2][2] = 1e1;
class MyUserFunction : public apf::Function
{
public:
MyUserFunction(apf::Field* f, apf::Mesh* m) : node_field(f), mesh(m) {}
void eval(apf::MeshEntity* e, double *result) {
if(NULL != node_field) {
apf::MeshElement* me = apf::createMeshElement(this->mesh, e);
apf::Element* f_elm = apf::createElement(this->node_field, me);
Test project /home/shivaebola/Documents/GitHub/core/build
Start 1: shapefun
Could not find executable shapefun
Looked in the following places:
shapefun
shapefun
Release/shapefun
Release/shapefun
Debug/shapefun
Debug/shapefun

Genesis by George Gamon

In the beginning God created radiation and ylem, And ylem was without shape or number, and the nucleons were rushing madly over the face of the deep.

And God said, "Let there be mass two." And there was was mass two. And God saw deuterium and it was good.

And God said, "Let there be mass three." And there was mass three. And God saw tritium and it was good.

And God continued to call numbers until He came to the transuranic elements. But when He looked back on his work, He found it was not good. In the excitement of counting, He missed calling for mass five, and so, naturally, no heavier elements could have been formed.

To spoof a MAC address to a different value:
$ sudo macchanger --mac=00:00:00:00:00:01 eth0
To spoof a MAC address to a random value while preserving the same OUI:
$ sudo macchanger -e eth0
To spoof a MAC address to a completely random value:
$ sudo macchanger -r eth0
To get all MAC address OUIs associated with a particular vendor (e.g., Juniper):
from Queue import Queue, Empty
from threading import Thread
import threading
import time
import urllib2
from bs4 import BeautifulSoup
GLOBAL_PAGE_VIEW_COUNT = 1
page_view_lock = threading.Lock()
@YetAnotherMinion
YetAnotherMinion / gist:26939126177b057f7598
Created July 13, 2015 19:55
CS resources before I loose them.txt
There were two WikiBooks that helped a lot:
http://en.wikibooks.org/wiki/Discrete_Mathematics/Set_theory
http://en.wikibooks.org/wiki/Set_Theory
For Discrete Maths I used the Mathematics for Computer Science text here: http://courses.csail.mit.edu/6.042/spring14/mcs.pdf
But I've since noticed that there's a full MIT OCW course for oen of the older versions (2010): http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-042j-mathematics-for-computer-science-fall-2010/