Skip to content

Instantly share code, notes, and snippets.

View falsefalse's full-sized avatar

Illia Furman falsefalse

View GitHub Profile
Index: sapi/cli/config.w32
===================================================================
--- sapi/cli/config.w32 (revision 308839)
+++ sapi/cli/config.w32 (working copy)
@@ -6,7 +6,8 @@
ARG_ENABLE('cli-win32', 'Build console-less CLI version of PHP', 'no');
if (PHP_CLI == "yes") {
- SAPI('cli', 'php_cli.c', 'php.exe');
+ SAPI('cli', 'php_cli.c php_http_parser.c php_cli_server.c', 'php.exe');
@falsefalse
falsefalse / .gitignore
Created November 20, 2011 00:05
Add all LaterLoop unread links to Instapaper
node_modules
@sirmax
sirmax / fix-wifi.sh
Last active December 11, 2015 15:28
#! /usr/bin/env bash
function nEnabled {
system_profiler -detailLevel mini SPAirPortDataType | grep -e 'Supported PHY Modes: .*n'
}
until nEnabled && sleep 2 && nEnabled;
do
echo 'resetting airport'
networksetup -setairportpower en1 off; networksetup -setairportpower en1 on
@akuzemchak
akuzemchak / Side Bar.sublime-menu
Created August 13, 2011 15:35
Reveal folder in Finder for Sublime Text 2
# add this to the main command array...
{ "caption": "Open Containing Folder…", "command": "open_this_folder", "args": {"dirs": []} }
@cpq
cpq / restore_mac_trash.pl
Created January 22, 2015 10:41
MacOS: restore all files from Trash folder to their original location
#!/usr/bin/env perl
# Copyright (c) 2015 Sergey Lyubka
# All rights reserved
use Encode;
my $dir = "/Users/$ENV{USER}/.Trash";
sub read_file($) { local $/; open FD, $_[0] or die $_[0]; binmode FD; <FD>; }
@jonraasch
jonraasch / jQuery.support-transition.js
Created April 21, 2010 14:32
Extends the jQuery.support object to CSS3 transition
// jQuery.support.transition
// to verify that CSS3 transition is supported (or any of its browser-specific implementations)
$.support.transition = (function(){
var thisBody = document.body || document.documentElement,
thisStyle = thisBody.style,
support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined;
return support;
})();
@lunelson
lunelson / hsy.scss
Last active March 8, 2022 14:15
sRGB BT-709 Brightness (Luma) function and HSY() color function for Sass
// sRGB GAMMA CORRECTION, per spec: https://en.wikipedia.org/wiki/SRGB
@function re-gamma($n) { @if $n <= 0.0031308 { @return $n * 12.92; } @else { @return 1.055 * pow($n,1/2.4) - 0.055; } }
@function de-gamma($n) { @if $n <= 0.04045 { @return $n / 12.92; } @else { @return pow((($n + 0.055)/1.055),2.4); } }
// sRGB BT-709 BRIGHTNESS
@function brightness($c) {
$rlin: de-gamma(red($c)/255);
$glin: de-gamma(green($c)/255);
$blin: de-gamma(blue($c)/255);
@return re-gamma(0.2126 * $rlin + 0.7152 * $glin + 0.0722 * $blin) * 100;
@edtsech
edtsech / lightning_talk_proposal.md
Last active January 31, 2023 07:29
Combining snapshot testing and component library -- ReactiveConf 2017 talk proposal

This is a proposal for a lightning talk at Reactive Conf. Please 🌟 this gist to push the proposal!

Combining snapshot testing and component library

Do you test presentational logic of your components? No? Yes, but you feel like you are writing a lot of dummy tests? You even probably use snapshot tests for that, but don't feel like you make enought value from them..

If so, click 🌟 button on that Gist!

I'll talk how our team is using snapshot testing to iterate faster,

@fabiofl
fabiofl / gist:5873100
Created June 27, 2013 00:41
Clear Mac OS X's icon cache.
sudo find /private/var/folders/ -name com.apple.dock.iconcache -exec rm {} \;
@magnetikonline
magnetikonline / README.md
Last active December 29, 2023 13:47
Import all GPG keys for GitHub organisation users.

Import all GPG keys for GitHub organisation users

Script to fetch a GitHub organisation member list and gpg --import the public GPG key(s) for each member with GPG key(s) associated against their profile.

Requires curl for GitHub API calls, jq for parsing GitHub REST API responses and (obviously) gpg.

Usage

Create a GitHub personal access token (classic or fine-grained) with read access to organisation members: