Skip to content

Instantly share code, notes, and snippets.

View Halleck45's full-sized avatar

Jean-François Lépine Halleck45

View GitHub Profile
@sangupta
sangupta / main.go
Created April 27, 2022 05:50
Parse Typescript code in Go lang using v8go. The idea is to re-use the original Typescript library than rolling out a parser of our own.
package main
import (
"fmt"
"io/ioutil"
v8 "rogchap.com/v8go"
)
func main() {
@cvrebert
cvrebert / css_regression_testing.md
Last active May 28, 2024 17:42
Survey of screenshot-based CSS testing tools

Currently considering https://github.com/webdriverio/webdrivercss


Core Goals:

  • Can test in up-to-date versions of all major browsers
  • Can test on up-to-date versions of all major OSes
  • Can test in IE9 (because Bootstrap v4 will support IE9+)
  • Don't want to have to setup/maintain our own cluster of VMs running all the necessary OSes (and all the versions of Windows)
  • Workflow for management of reference/baseline/norm screenshots
@aslakhellesoy
aslakhellesoy / Makefile
Last active August 29, 2015 13:56
How to concatenate and minify js with make
BIN = node_modules/.bin
# Combine, ngmin and minify all of our own scripts
public/app.js: \
ng-app/providers/providers.js \
ng-app/providers/*.js \
ng-app/cucumber_pro.js \
ng-app/**/*.js
ifdef DEBUG
@Halleck45
Halleck45 / profiler.sh
Last active August 29, 2015 13:56
Run xdebug tracefile-analyzer on script
#!/bin/bash
# Usage
# ./profiler.sh /path/to/phpfile.php arg1 arg2 ...
if [ ! -f tracefile-analyser.php ]
then
echo get tracefile-analyser
wget https://raw.github.com/derickr/xdebug/master/contrib/tracefile-analyser.php
fi
@dergachev
dergachev / squid-deb-proxy_on_docker.md
Last active May 25, 2023 03:55
Caching debian package installation with docker

TLDR: I now add the following snippet to all my Dockerfiles:

# If host is running squid-deb-proxy on port 8000, populate /etc/apt/apt.conf.d/30proxy
# By default, squid-deb-proxy 403s unknown sources, so apt shouldn't proxy ppa.launchpad.net
RUN route -n | awk '/^0.0.0.0/ {print $2}' > /tmp/host_ip.txt
RUN echo "HEAD /" | nc `cat /tmp/host_ip.txt` 8000 | grep squid-deb-proxy \
  && (echo "Acquire::http::Proxy \"http://$(cat /tmp/host_ip.txt):8000\";" > /etc/apt/apt.conf.d/30proxy) \
  && (echo "Acquire::http::Proxy::ppa.launchpad.net DIRECT;" >> /etc/apt/apt.conf.d/30proxy) \
  || echo "No squid-deb-proxy detected on docker host"
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active November 10, 2024 03:45
A badass list of frontend development resources I collected over time.
@larvanitis
larvanitis / Yeoman-ng_gen.xml
Last active December 17, 2015 09:29
Webstorm / IDEA :: External Tools :: Yeoman angular:* generators (w/o --coffee or --minsafe) Installation: drop in ~/.WebStorm6/config/tools/
<?xml version="1.0" encoding="UTF-8"?>
<toolSet name="Yeoman[ng]">
<tool name="Create Route" description="Generates a controller and view, and configures a route in app/scripts/app.js connecting them." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="yo" />
<option name="PARAMETERS" value="angular:route $Prompt$" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
<tool name="Create Controller" description="Generates a controller in app/scripts/controllers." showInMainMenu="true" showInEditor="false" showInProject="true" showInSearchPopup="false" disabled="false" useConsole="false" showConsoleOnStdOut="false" showConsoleOnStdErr="true" synchronizeAfterRun="true">
@Halleck45
Halleck45 / css-stats-ack.sh
Created September 28, 2012 18:19 — forked from pjkix/css-stats-ack.sh
shell script to generate some css file statistics
#!/bin/bash
## v1.0.6
## this script will gernerate css stats
### example output
# CSS STATS
# ----------
# Floats: 132
@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:

@wataru420
wataru420 / addUser
Created February 7, 2012 03:54
Jenkins init script for centos
/usr/sbin/groupadd -g 30119 jenkins
/usr/sbin/useradd -u 30119 -g jenkins jenkins
mkdir /home/jenkins
chown -R jenkins. /home/jenkins