Skip to content

Instantly share code, notes, and snippets.

@kompuser
kompuser / NPM installation requirements
Created May 12, 2021 11:15 — forked from benjaminsinger/NPM installation requirements
Roots Sage Gulpfile Including Critical CSS and CombineMQ
npm install --save asset-builder browser-sync del gulp gulp-autoprefixer gulp-changed gulp-concat gulp-cssnano gulp-flatten gulp-if gulp-imagemin gulp-jshint gulp-less gulp-plumber gulp-rename gulp-rev gulp-sass gulp-sourcemaps gulp-uglify imagemin-pngcrush jshint jshint-stylish lazypipe merge-stream minimist run-sequence traverse wiredep gulp-util gulp-combine-mq critical gulp-rename gulp-penthouse
@kompuser
kompuser / facebook-contact-info-summary.rb
Created March 23, 2018 17:23 — forked from dylanmckay/facebook-contact-info-summary.rb
A Ruby script for collecting phone record statistics from a Facebook user data dump
#! /usr/bin/env ruby
# This script can be used to parse and dump the information from
# the 'html/contact_info.htm' file in a Facebook user data ZIP download.
#
# It prints all cell phone call + SMS message + MMS records, plus a summary of each.
#
# It also dumps all of the records into CSV files inside a 'CSV' folder, that is created
# in whatever the working directory of the program is when executed.
#
module.exports = {
files: {
javascripts: {
joinTo: {
'js/vendor.js': /^(?!app)/,
'js/app.js': /^app/
}
},
stylesheets: {
joinTo: 'css/app.css'
@kompuser
kompuser / README.md
Last active June 26, 2017 13:02
SEPPA super-small-test backend test!

Test SEPPA : développeur back-end

  • Principe du test : Traitement (import — export) d'un lot de données en JSON.
  • Langage : PHP ou JS ou les 2 !

Taches principales :

NOTE: vous êtes libres d'utiliser le framework et/ou bilbiothèque de votre choix. Un bonus pour en justifier le choix.

  1. Objet JSON, source et préparation :
@kompuser
kompuser / simple_google_analytics.rb
Created January 20, 2017 13:10 — forked from chrisle/simple_google_analytics.rb
My simple Google Analytics API export API. Exports GA data as an array of flattened hashes with a SHA1 signature. No DSL, no sugar.
require 'digest'
# = simple_google_analytics.rb
#
# Chris Le <chris at iamchrisle dot com>
#
# This module is an wrapper to export data from Google Analytics as a flattened
# hash suitable for database storage. It does not require any other gems other
# than 'oauth'. I used this simply to get metrics and directly store them in
# a database.
@kompuser
kompuser / main.js
Created December 20, 2016 10:50 — forked from Bobz-zg/main.js
Filter WordPress posts by custom taxonomy term with AJAX - Javscript
(function($) {
$doc = $(document);
$doc.ready( function() {
/**
* Retrieve posts
*/
function get_posts($params) {
@kompuser
kompuser / functions.php
Created December 20, 2016 10:50 — forked from Bobz-zg/functions.php
Filter WordPress posts by custom taxonomy term with AJAX
<?php
/**
* AJAC filter posts by taxonomy term
*/
function vb_filter_posts() {
if( !isset( $_POST['nonce'] ) || !wp_verify_nonce( $_POST['nonce'], 'bobz' ) )
die('Permission denied');
/**
@kompuser
kompuser / demo.js
Created December 7, 2016 14:43 — forked from pascalduez/demo.js
Drupal 7 — Basic Ajax request (manual)
/**
* @file demo JS.
* jQuery 1.5+
*/
(function( $ ) {
// On DOM ready
$(function() {
@kompuser
kompuser / index.html
Created July 5, 2016 16:00
schema hyd&au
<div class="perspective">
<hr>
<div class="vertical"><hr></div>
<div class="layer layer-02">
<a href="#">2.<br>ACTIONNEUR</a>
</div>
@kompuser
kompuser / multisite_functions.php
Created May 16, 2016 13:55 — forked from freekrai/multisite_functions.php
Some handy wordpress multisite functions
<?php
$posts = multisite_latest_post( array(
"how_many"=>10,
"how_long_days"=>30,
"how_many_words"=>50,
"more_text"=>"[...]",
"remove_html"=>true,
"sort_by"=>"post_date",
// if paginating:
"paginate"=>true,