Skip to content

Instantly share code, notes, and snippets.

View wedancedalot's full-sized avatar
🧗

Eugene wedancedalot

🧗
View GitHub Profile
@wedancedalot
wedancedalot / gulpfile.js
Last active September 28, 2015 07:51
Sharing my gulpfile
// npm install --save-dev gulp gulp-sass gulp-autoprefixer gulp-minify-css gulp-notify gulp-jshint gulp-concat gulp-rename gulp-uglify gulp-livereload gulp-imagemin gulp-cache
var gulp = require('gulp'),
sass = require('gulp-sass'),
prefix = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
notify = require('gulp-notify'),
jshint = require('gulp-jshint'),
concat = require('gulp-concat'),
rename = require('gulp-rename'),
uglify = require('gulp-uglify'),
@wedancedalot
wedancedalot / prestashop14_dump.sql
Last active December 28, 2019 15:29
SQL queries used to dump data from prestashop 1.4. The output format is ready to be imported via prestashop 1.6 csv import out of box.
-------------------------------------------------
-- DUMP CATEGORIES
-- Fields to be imported: 'ID', 'Active (0/1)', 'Name *', 'Parent category', 'Root category (0/1)', 'Description', 'Meta title', 'Meta keywords', 'Meta description', 'URL rewritten', 'Image URL',
-------------------------------------------------
SELECT a.id_category, a.active, b.name, c.name as parent_name, 0 as is_root,
b.description, b.meta_title, b.meta_keywords, b.meta_description, b.link_rewrite, "" as image_url
FROM ps_category AS a
JOIN ps_category_lang AS b ON a.id_category = b.id_category
LEFT JOIN ps_category_lang AS c ON a.id_parent = c.id_category
@wedancedalot
wedancedalot / grep_for_phpshell.sh
Created February 16, 2016 14:26
Grep to search for php shells
grep '((eval.*(base64_decode|gzinflate|\$_))|\$[0O]{4,}|FilesMan|JGF1dGhfc|IIIl|die\(PHP_OS|posix_getpwuid|Array\(base64_decode|document\.write\("\\u00|sh(3(ll|11)))' . -lroE --include=*.php*
@wedancedalot
wedancedalot / enable_mongo.sh
Created May 25, 2016 16:31 — forked from sgnn7/enable_mongo.sh
Mongodb 3.2 on Ubuntu 15.10
echo '[Unit]
Description=High-performance, schema-free document-oriented database
After=syslog.target network.target
[Service]
User=mongodb
Group=mongodb
ExecStart=/usr/bin/mongod -f /etc/mongod.conf
[Install]
@wedancedalot
wedancedalot / anchor_migrate.rs
Last active August 29, 2022 18:29
Migrate state Anchor Solana (with reallocation)
use std::io::Write;
use anchor_lang::{prelude::*, solana_program::{entrypoint::ProgramResult}};
/// Old state
#[account]
pub struct ConfigDeprecated {
pub initial_field: Pubkey,
}