Skip to content

Instantly share code, notes, and snippets.

View eugeniomiro's full-sized avatar
🦷

Eugenio Miró eugeniomiro

🦷
View GitHub Profile
@arranbartish
arranbartish / protractor.conf.js
Created March 17, 2017 11:51
Protractor + mocha config for typescript
// Protractor configuration file, see link for more information
// https://github.com/angular/protractor/blob/master/lib/config.ts
exports.config = {
allScriptsTimeout: 11000, // Timeout of each script
specs: [
'./e2e/**/*.e2e-spec.ts' // pattern for your tests
],
baseUrl: 'http://localhost:4200/', // URL of your SUT
capabilities: {
anonymous
anonymous / arduino.ino
Created June 12, 2016 21:19
const int phase1pin = 3;
const int phase2pin = 5;
const int phase3pin = 6;
float holdTime;
float targetSpeed;
unsigned long p1start,
p1end,
p2stafghfgfghrt,
@joepie91
joepie91 / .md
Last active June 10, 2024 14:18
Running a Node.js application using nvm as a systemd service

Read this first!

Hi there! Since this post was originally written, nvm has gained some new tools, and some people have suggested alternative (and potentially better) approaches for modern systems. Make sure to have a look at the comments to this article, before following this guide!


The original article

Trickier than it seems.

@tailriver
tailriver / dlopen_sample.c
Created November 18, 2015 04:21
A sample of using dlopen library.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dlfcn.h>
int main(int argc, char** argv)
{
void *handle;
void (*func_print_name)(const char*);
@stefanbc
stefanbc / perms.md
Last active June 16, 2024 19:16
Set proper permissions on /var/www/

HOWTO

To set up permissions on /var/www where your files are served from by default:

sudo addgroup webmasters
sudo adduser $USER webmasters
sudo chown -R root:webmasters /var/www
sudo find /var/www -type f -exec chmod 664 {} \;
sudo find /var/www -type d -exec chmod 775 {} \;
@ahawker
ahawker / battery.cs
Last active June 13, 2024 21:07
Battery info from win32 api
using System;
using System.IO;
using Microsoft.Win32.SafeHandles;
using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.InteropServices;
using System.Text;
namespace Test
{
@demisx
demisx / angularjs-providers-explained.md
Last active May 17, 2024 03:38
AngularJS Providers: Constant/Value/Service/Factory/Decorator/Provider
Provider Singleton Instantiable Configurable
Constant Yes No No
Value Yes No No
Service Yes No No
Factory Yes Yes No
Decorator Yes No? No
Provider Yes Yes Yes

Constant

@heaths
heaths / Move-WixPackageCache.ps1
Last active December 30, 2017 20:31
How to relocate the Package Cache
<#
This license governs use of the accompanying software. If you use the software, you
accept this license. If you do not accept the license, do not use the software.
1. Definitions
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the
same meaning here as under U.S. copyright law.
A "contribution" is the original software, or any additions or changes to the software.
A "contributor" is any person that distributes its contribution under this license.
"Licensed patents" are a contributor's patent claims that read directly on its contribution.