Skip to content

Instantly share code, notes, and snippets.

View hellboy81's full-sized avatar
🌴
On job search

hellboy81

🌴
On job search
  • Kamasys GmbH
  • Germany
  • 17:58 (UTC +02:00)
View GitHub Profile
@ifraixedes
ifraixedes / LICENSE
Last active May 6, 2018 06:44
AWS lambda handler which download images from S3, resizes them and upload the new ones to S3; tested with mocha, chai, sinon and proxyquire
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004
(http://www.wtfpl.net/about/)
Copyright (C) 2015 Mario Mendes (@hyprstack)
Copyright (C) 2015 Ivan Fraixedes (https://ivan.fraixed.es)
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
@mistakster
mistakster / index.md
Last active August 8, 2017 17:55
Functional tests of the Yandex’s homepage
@carbonrobot
carbonrobot / linqpadtest.cs
Created February 11, 2015 20:03
Unit testing in Linqpad
public interface IRunner { void Execute(); }
// Add any unit tests by implementing IRunner and Linqpad will run it
public class UserTest_1 : IRunner
{
public void Execute()
{
Debug.WriteLine("Beginning test");
var x = 4 + 5;
@gregsh
gregsh / - IDE Scripting.md
Last active May 25, 2025 20:35
IDE Scripting

Here are my attempts to script an IntelliJ-based IDE using javax.script.* API (ex-JSR-223).

The list of available scripting languages and engines:

  1. Groovy - built-in, via Groovy jars and <app>/lib/groovy-jsr223-xxx.jar
  2. JavaScript (Nashorn) - built-in, via Java Runtime <app>/jbr/... (deprecated and will be removed soon)
  3. JavaScript (GraalJS) - https://plugins.jetbrains.com/plugin/12548-intellij-scripting-javascript
  4. JPython - https://plugins.jetbrains.com/plugin/12471-intellij-scripting-python
  5. JRuby - https://plugins.jetbrains.com/plugin/12549-intellij-scripting-ruby
  6. Clojure - https://plugins.jetbrains.com/plugin/12469-intellij-scripting-clojure
@InFog
InFog / proceduralphp.md
Last active September 14, 2024 19:06
PHP Procedural Framework Manifesto

Procedural PHP Manifesto

We are web site developers (a.k.a. webmasters) and we just want to get stuff done. We don't need Object Orientation and we don't need Design Patters and other boring and not easy to learn and understand stuff to get in our way to get our sites up and running.

And that's why our values are:

  1. Procedural Code over Object Orientation
  • No one actually needs OO to develop web applications
  • Classes with only static functions are ok, since it's just a way to keep functions in one place. And is still procedural
  1. Explicitly load what you need over autoloaders
@hallem
hallem / RestSharp_FileAsBody.cs
Last active December 29, 2024 21:10
RestSharp file as body
public RestApiResponse<bool> PutEnvelopesDocuments(string envelopeId, string documentId, string fullFileName, byte[] documentBytes)
{
RestRequest request = GetBaseRequest("envelopes/{envelopeId}/documents/{documentId}", Method.PUT);
request.AddUrlSegment("envelopeId", envelopeId);
request.AddUrlSegment("documentId", documentId);
request.AddHeader("Content-Type", "application/pdf");
request.AddHeader("Content-Disposition",
string.Format("file; filename=\"{0}\"; documentid={1}; fileExtension=\"{2}\"",
Path.GetFileNameWithoutExtension(fullFileName), documentId, Path.GetExtension(fullFileName)));
@jsor
jsor / ddd_cqrs_event-sourcing_in_php.md
Last active July 30, 2024 11:28
DDD, CQRS and Event Sourcing in PHP

DDD, CQRS and Event Sourcing in PHP

  • Broadway - Infrastructure and testing helpers for creating CQRS and event sourced applications
  • EventCentric.Core - Event Sourcing and CQRS in PHP
  • LiteCQRS - Small convention based CQRS library for PHP
  • predaddy - Common DDD classes including an annotation driven message bus and tools for CQRS and Event Sourcing
  • ProophEventSourcing - Provides basic functionality for event-sourced aggregates
  • ProophEventStore - PHP 5.4+ EventStore Implementation
  • ProophServiceBus - PHP Enterprise Service Bus Implementation supporting CQRS and DDD
@jvanderwee
jvanderwee / ZAPI.java
Last active May 13, 2019 09:05
Java helper class for calling ZAPI
import java.io.BufferedReader;
import java.io.File;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.URL;
import java.util.ArrayList;
@LeCoupa
LeCoupa / nodejs-cheatsheet.js
Last active February 27, 2025 20:09
Complete Node.js CheatSheet --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
/* *******************************************************************************************
* THE UPDATED VERSION IS AVAILABLE AT
* https://github.com/LeCoupa/awesome-cheatsheets
* ******************************************************************************************* */
// 0. Synopsis.
// http://nodejs.org/api/synopsis.html
var sinon = require('sinon');
var assert = require('assert');
function async(cb) {
setTimeout(function() {
cb();
}, 1000);
}
describe('async()', function() {