Skip to content

Instantly share code, notes, and snippets.

@jphalip
jphalip / poweroff.py
Last active October 18, 2021 21:54
A Python script I wrote to quickly shut down Vagrant/VirtualBox VMs. See also the associated blog post: https://www.julienphalip.com/blog/fast-shutdown-of-development-vagrantvirtualbox/
#!/usr/bin/env python
import argparse
import re
import os
import subprocess
try:
import json
except ImportError:
import simplejson as json
@tomkel5
tomkel5 / main.php
Created November 7, 2013 05:50
Example of Symfony Crawler
<?php
require_once 'vendor/autoload.php';
use Symfony\Component\DomCrawler\Crawler;
$html = '<!DOCTYPE html>
<html>
<body>
<table border="0" cellpadding="0" cellspacing="1">
<tr>
@hard-geha
hard-geha / save-running-virtualboxes
Created January 14, 2014 11:11
Simple init.d script to save all running virtualboxes on host shutdown or reboot
#!/bin/bash
### BEGIN INIT INFO
# Provides: save-running-virtualboxes
# Required-Start:
# Required-Stop: $network
# Default-Start:
# Default-Stop: 0 1 6
# Short-Description: Stops all running virtualboxes
# Description: Stops all running virtualboxes of all users
### END INIT INFO
@rogeriopradoj
rogeriopradoj / 1.md
Last active August 29, 2015 14:02
PHPSP + TestFest, PHPSP+TestFest , #phpspMaisTestFest - referências - foundation
@aczietlow
aczietlow / selenium-php-webdriver-cheatsheet.md
Last active July 29, 2024 03:55 — forked from huangzhichong/selenium-webdriver-cheatsheet.md
Cheat sheet for using php webdriver (facebook/webdriver).

Webdriver PHP API workthough

  • Open a browser

    # start an instance of firefox with selenium-webdriver
    
    $browser_type = 'firefox'
    $host = 'http://localhost:4444/wd/hub'
    

$capabilities = array(\WebDriverCapabilityType::BROWSER_NAME => $browser_type);

@royopa
royopa / Preferences.sublime-settings
Created January 1, 2015 12:37
My Sublime Settings
// Place your settings in the file "User/Preferences.sublime-settings", which
// overrides the settings in here.
//
// Settings may also be placed in file type specific options files, for
// example, in Packages/Python/Python.sublime-settings for python files.
{
// Sets the colors used within the text area
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
// Note that the font_face and font_size are overridden in the platform
@potatoqualitee
potatoqualitee / Test-Faf.ps1
Last active February 24, 2021 15:11
Insanely fast CSV to SQL Server imports using the FAF technique (batched datasets and in-line multithreading)
<#
PowerShell, SqlBulkCopy and RunSpaces Speed Test
-- To be used for speed testing purposes with million.csv --
-- Will drop and recreate specified database if it exists --
This script will
- Automatically download the million row dataset if it doesn't exist
- Drop the specified database if it exists
/*
TITLE: CODE GRABBER FOR HT6P20B ENCODER
CREATED BY: AFONSO CELSO TURCATO
DATE: 14/JAN/2014
E-MAIL: acturcato (at) gmail.com
LICENSE: GPL
REV.: 00
DESCRIÇÃO:
http://acturcato.wordpress.com/2014/01/14/clonagem-de-controle-remoto-rf-learning-code-ht6p20b-com-arduino/
@kunicmarko20
kunicmarko20 / Article.php
Last active November 16, 2023 07:52
Symfony Second Level Cache
<?php
namespace AppBundle\Entity;
/**
* @package AppBundle\Entity
* @ORM\Entity()
* @ORM\Table()
* @ORM\Cache(usage="NONSTRICT_READ_WRITE")
*/