Skip to content

Instantly share code, notes, and snippets.

View ceremcem's full-sized avatar

Cerem Cem ASLAN ceremcem

View GitHub Profile
#!/bin/bash
# HOWTO:
# Create csr, buy certificate, get .crt from somewhere, save it as server.crt
# run this script
cat server.crt \
COMODORSADomainValidationSecureServerCA.crt \
COMODORSAAddTrustCA.crt \
AddTrustExternalCARoot.crt > server.chained.crt
@ceremcem
ceremcem / Makefile
Last active October 23, 2017 21:06
oneshell testing
.ONESHELL:
SHELL = /bin/bash
.SHELLFLAGS = -e
test:
cd /tmp
X=$(pwd)
echo "here is $$X"
@ceremcem
ceremcem / Makefile
Created March 19, 2016 00:36
use bash scripts in make files
define my_test =
cd /tmp
pwd
X="hello $(pwd)"
echo "here is $X"
endef
test: ; @$(value my_test)
@ceremcem
ceremcem / MMakefile
Last active March 19, 2016 10:50
Mixed makefile for building makefiles with multiple languages
# default interpreter is BASH
my-target:
echo "hello"
X=1
echo "this is X: $X"
# One target may use Python
my-other-target.py:
i = 5
print "hello there %d" % i
This file has been truncated, but you can view the full file.
Wed, 23 Mar 2016 13:49:53 GMT brunch:watch Loaded plugins: css-brunch, jade-static-brunch, javascript-brunch, less-brunch, livescript-brunch
Wed, 23 Mar 2016 13:49:53 GMT brunch:file-list Reading 'node_modules/jade-static-brunch/node_modules/jade/runtime.js'
Wed, 23 Mar 2016 13:49:53 GMT brunch:watch File 'app' received event 'addDir'
Wed, 23 Mar 2016 13:49:54 GMT brunch:watch File 'test' received event 'addDir'
Wed, 23 Mar 2016 13:49:54 GMT brunch:watch File 'vendor' received event 'addDir'
Wed, 23 Mar 2016 13:49:54 GMT brunch:watch File 'package.json' received event 'add'
Wed, 23 Mar 2016 13:49:54 GMT brunch:watch File 'config.coffee' received event 'add'
Reading { [Error: ENOENT: no such file or directory, open 'node_modules/jade-static-brunch/node_modules/jade/runtime.js']
errno: -2,
code: 'ENOENT',
This file has been truncated, but you can view the full file.
Thu, 24 Mar 2016 04:44:35 GMT brunch:watch Loaded plugins: css-brunch, javascript-brunch, less-brunch, livescript-brunch
Thu, 24 Mar 2016 04:44:35 GMT brunch:watch File 'app' received event 'addDir'
Thu, 24 Mar 2016 04:44:35 GMT brunch:watch File 'test' received event 'addDir'
Thu, 24 Mar 2016 04:44:35 GMT brunch:watch File 'vendor' received event 'addDir'
Thu, 24 Mar 2016 04:44:35 GMT brunch:watch File 'package.json' received event 'add'
Thu, 24 Mar 2016 04:44:35 GMT brunch:watch File 'config.coffee' received event 'add'
Thu, 24 Mar 2016 04:44:35 GMT brunch:watch File 'app/assets' received event 'addDir'
Thu, 24 Mar 2016 04:44:35 GMT brunch:watch File 'app/jade_asset' received event 'addDir'
Thu, 24 Mar 2016 04:44:35 GMT brunch:watch File 'app/modules' received event 'addDir'
Thu, 24 Mar 2016 04:44:35 GMT brunch:watch File 'app/partials' received event 'addDir'
edit-this:
gedit Makefile &
untar:
tar -xvf *.tgz
download:
wget https://github.com/jeelabs/esp-link/releases/download/v2.1.7/esp-link-v2.1.7.tgz
make untar
How Samba was written
---------------------
Andrew Tridgell
August 2003
Method 1:
---------

Add following lines to /etc/rc.local:

USER="myusername"
su ${USER} -c '/home/${USER}/apps/run'

Place a file at /home/myusername/apps/run with the following content:

/**
By Steve Hanov
Released to the public domain
*/
/* CJSON.stringify() to convert from objects to string
CJSON.parse() to convert from string to objects.
More documentation is pending.