Skip to content

Instantly share code, notes, and snippets.

View indatawetrust's full-sized avatar
🏠
Working from home

Ahmet Simsek indatawetrust

🏠
Working from home
View GitHub Profile
Delete all containers
docker rm $(docker ps -a -q)
Delete all images
docker rmi $(docker images -q)
@indatawetrust
indatawetrust / rebar-reltool-relase-notes.md
Created February 4, 2016 15:29 — forked from ToddG/rebar-reltool-relase-notes.md
using rebar to create an erlang app with a dependency, and then starting a release created with reltool

Summary

I'm trying to figure out how to use rebar to:

  • create erlang project
  • add a dependency on an erlang module from github
  • start the app via the erl console
  • create a release and start the app from the release (via the generated scripts)
add to .vimrc file
:set mouse=a
xterm*faceName: Monospace
xterm*faceSize: 14
xterm*background: rgb:34/98/db
xterm*foreground: rgb:ec/f0/f1
xterm*rightScrollBar: true
xterm*ScrollBar: true
xterm*scrollTtyOutput: false
xterm*VT100.Translations: #override \
Ctrl Shift <Key>V: insert-selection(CLIPBOARD) \n\
Ctrl Shift <Key>C: copy-selection(CLIPBOARD)
nohup nodemon --exec babel-node index < /dev/null &
@indatawetrust
indatawetrust / action.cpp
Last active May 18, 2016 20:50
cocos2d-x sprite touch event run action
auto sprite = Sprite::create("HelloWorld.png");
auto listener1 = EventListenerTouchOneByOne::create();
listener1->onTouchBegan = [](Touch* touch, Event* event){
auto sprite = event->getCurrentTarget();
Point pt = touch->getLocation();
@indatawetrust
indatawetrust / loop.cpp
Last active May 19, 2016 11:10
cocos2d-x vector array
Vector <Sprite *> spriteArray;
for(int i=0;i<5;i++)
{
auto sprite = Sprite::create("ball.png");
spriteArray.pusbBack();
}
int k = 1;
@indatawetrust
indatawetrust / center.cpp
Created May 19, 2016 11:24
cocos2d-x sprite center position
Size visibleSize = Director::getInstance()->getVisibleSize();
Vec2 origin = Director::getInstance()->getVisibleOrigin();
auto sprite = Sprite::create("ball.png");
sprite->setPosition(Vec2(visibleSize.width / 2 + origin.x,
visibleSize.height / 2 + origin.y));
#include <iostream>
#include <string>
#include <map>
#include <vector>
using namespace std;
class Array
{
vector<map<string,string>> array;
nc -vz -u 127.0.0.1 4500