Skip to content

Instantly share code, notes, and snippets.

View CRTX's full-sized avatar

Christian Ruiz CRTX

View GitHub Profile

Framework Laptop Diagnostic LED Sequence (Intel 11th Gen Intel® Core™)

# Blink Color Description enum value in EC firmware
White Start of diagnosis DIAGNOSTICS_START
1 Red/Green Battery connected check DIAGNOSTICS_HW_NO_BATTERY
2 Red/Green Power Good 3V5V supply DIAGNOSTICS_HW_PGOOD_3V5V
3 Red/Green Power Good VCCIN_AUX DIAGNOSTICS_VCCIN_AUX_VR
4 Red/Green CPU deassert sleep S4 DIAGNOSTICS_SLP_S4
5 Red/Green Power boot core VR DIAGNOSTICS_HW_PGOOD_VR
@jkereako
jkereako / Contract Killer 3.md
Last active January 21, 2021 20:22
This is a more serious version of Contract Killer 3. Some language and provisions were taken from a lawyer-speak contract and injected here.

date

Identification of parties

This agreement is made between customer name ("you") of company name located at customer address and developer name ("us") of developer's company located at company address.

Purpose of agreement

You desire to retain us as an independent contractor to develop the name of application (the "application") described in the section, Technical specifications.

We are ready, willing and able to undertake the development of the application and agree to do so under the terms and conditions set forth in this agreement.

@MartyMacGyver
MartyMacGyver / RPi_Kernel_building_cross_compiled.sh
Last active May 12, 2021 06:45
Building the kernel for the Raspberry Pi/Pi2/Pi3 using a cross-compiler
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
###############################################################################
@ornj
ornj / ClientCreateCommand.php
Created March 1, 2013 00:12
Symfony2 command for creating a Client for FOSOAuthServerBundle
<?php
namespace Acme\Bundle\OAuthBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
@marijn
marijn / terms-and-conditions-in-label.twig
Created November 23, 2012 21:54
This is how you add a link to a label with Symfony forms, sort of. Cause you'll have a label tag twice...
{% set terms_link %}<a title="{% trans %}Read the General Terms and Conditions{% endtrans %}" href="{{ path('get_general_terms_and_conditions') }}">{% trans %}General Terms and Conditions{% endtrans %}</a>{% endset %}
{% set general_terms_and_conditions %}{{ 'I have read and accept the %general_terms_and_conditions%.'|trans({ '%general_terms_and_conditions%': terms_link })|raw }}{% endset %}
<div>
{{ form_errors(form.acceptGeneralTermsAndConditions) }}
{{ form_widget(form.acceptGeneralTermsAndConditions) }}
<label for="{{ form.acceptGeneralTermsAndConditions.vars.id }}">{{ general_terms_and_conditions|raw }}</label>
</div>
@iwek
iwek / drag-drop-upload-unzip.js
Created October 2, 2012 19:43
Drag and Drop, Upload and Unzip
/* Drag'n drop stuff */
var drag = document.getElementById("drag");
drag.ondragover = function(e) {e.preventDefault()}
drag.ondrop = function(e) {
e.preventDefault();
var length = e.dataTransfer.items.length;
for (var i = 0; i < length; i++) {
var entry = e.dataTransfer.items[i].webkitGetAsEntry();
var file = e.dataTransfer.files[i];
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@paulirish
paulirish / rAF.js
Last active November 18, 2025 04:17
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
@tkarpinski
tkarpinski / EnableLinkedConnections.reg
Created January 5, 2012 16:47
A reg file to EnableLinkedConnections (Network Drives over UAC) http://support.microsoft.com/kb/937624
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System]
"EnableLinkedConnections"=dword:00000001
@jbhannah
jbhannah / he-ipv6.sh
Created May 23, 2011 17:51
Hurricane Electric IPv6 Tunnel Broker script for Ubuntu
#!/bin/sh
# Hurricane Electric IPv6 Tunnel Broker script for Ubuntu
# /etc/network/if-up.d/he-ipv6.sh
# Written by Jesse B. Hannah (http://jbhannah.net) <[email protected]>
# Based on instructions provided by Hurricane Electric (http://tunnelbroker.net)
###
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal