Skip to content

Instantly share code, notes, and snippets.

View andreineculau's full-sized avatar
:bowtie:

Andrei Neculau andreineculau

:bowtie:
View GitHub Profile
@mhart
mhart / awslambda
Last active April 14, 2019 15:38
node_modules/awslambda
#!/usr/bin/env node
var path = require('path')
var fs = require('fs')
var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
require(lib + '/awslambda.js').start_runtime();

Install

npm install funcoffee

Require

require('funcoffee').expose global
@aktau
aktau / imessage
Last active June 11, 2023 20:30
Send iMessage from the commandline
#!/bin/sh
if [ "$#" -eq 1 ]; then stdinmsg=$(cat); fi
exec <"$0" || exit; read v; read v; read v; exec /usr/bin/osascript - "$@" "$stdinmsg"; exit
-- another way of waiting until an app is running
on waitUntilRunning(appname, delaytime)
repeat until my appIsRunning(appname)
tell application "Messages" to close window 1
delay delaytime
end repeat
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@konklone
konklone / ssl.rules
Last active August 8, 2023 08:39
nginx TLS / SSL configuration options for konklone.com
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email eric@konklone.com.
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {
;;; stupid-indent-mode.el --- Plain stupid indentation minor mode
;; Copyright (C) 2013 Mihai Bazon
;; Author: Mihai Bazon <mihai.bazon@gmail.com>
;; Keywords:
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
@andreineculau
andreineculau / gist:5426128
Last active December 16, 2015 11:18
Online projects/ideas revolving around github repos and gists
@axemclion
axemclion / Gruntfile.js
Created March 4, 2013 05:22
A grunt task to publish npm packages from CI environments like travis
grunt.registerMultiTask('publish', 'Publish the latest version of this plugin', function() {
var done = this.async(),
me = this,
npm = require('npm');
npm.load({}, function(err) {
npm.registry.adduser(me.data.username, me.data.password, me.data.email, function(err) {
if (err) {
console.log(err);
done(false);
} else {
@winks
winks / bisect.sh
Created February 4, 2013 10:02
git bisect for Jenkins
#!/bin/bash
# git bisect job for jenkins, originally by @bashlog
GOOD_BUILD=$(curl 'http://jenkins.example.org:8080/job/BUILDNAME/lastStableBuild/api/json' | sed 's:[{},]:\n:g'|grep '"number":'|sed 's/.*://')
BAD_BUILD=$(($GOOD_BUILD + 1))
curl -f "http://jenkins.example.org:8080/job/BUILDNAME/$BAD_BUILD/api/json" || BAD_BUILD=$(($GOOD_BUILD + 2))
curl -f "http://jenkins.example.org:8080/job/BUILDNAME/$BAD_BUILD/api/json" || BAD_BUILD=$(($GOOD_BUILD + 3))
curl -f "http://jenkins.example.org:8080/job/BUILDNAME/$BAD_BUILD/api/json" || BAD_BUILD=$(($GOOD_BUILD + 4))
curl -f "http://jenkins.example.org:8080/job/BUILDNAME/$BAD_BUILD/api/json" || BAD_BUILD=$(($GOOD_BUILD + 5))
curl -f "http://jenkins.example.org:8080/job/BUILDNAME/$BAD_BUILD/api/json" || BAD_BUILD=$(($GOOD_BUILD + 6))