Skip to content

Instantly share code, notes, and snippets.

@yos-virtus
yos-virtus / update-sql-table-with-csv-file.sql
Last active April 23, 2017 05:28
Update SQL Server table with csv data/Обновление данных таблицы SQL Server с помощью csv
IF OBJECT_ID('TempDB.dbo.#tmp_table', 'U') IS NULL
BEGIN
-- Create temp table if not it does not exest already / Создаем временную таблицу если ее еще нет
CREATE TABLE #tmp_table
(
field1 integer,
field2 varchar(255),
field3 varchar(255)
)
END

Last updated: 2017-03-18

Searching for Files

Find images in a directory that don't have a DateTimeOriginal

exiftool -filename -filemodifydate -createdate -r -if '(not $datetimeoriginal) and $filetype eq "JPEG"' .

###Output photos that don't have datetimeoriginal to a CSV### Note this can take a long time if you have a lot of jpgs

@Kennyl
Kennyl / build
Last active August 29, 2015 14:01
Pixmicat Openshift Build Script
#!/bin/bash -e
echo "### Download Pixmicat"
curl -o ${OPENSHIFT_DATA_DIR}/pixmicat.zip https://codeload.github.com/Kennyl/pixmicat/zip/develop
curl -o ${OPENSHIFT_DATA_DIR}/pixmicat_modules.zip https://codeload.github.com/Kennyl/pixmicat_modules/zip/develop
pushd ${OPENSHIFT_DATA_DIR}
@Kennyl
Kennyl / aes.js
Last active August 29, 2015 14:01
Various Script Language for AES256
var crypto = require('crypto');
var data = "中あ";
// data="bestwellgoodwill"
console.log('Original cleartext: ' + data);
var algorithm = 'aes-256-cbc';
var key = 'hello';
var clearEncoding = 'utf8';
//var cipherEncoding = 'hex';
//If the next line is uncommented, the final cleartext is wrong.
var cipherEncoding = 'binary';// or base64
anonymous
anonymous / adafruit_rgb_lcd_sparkcore
Created January 30, 2014 04:56
Bdubs modified i2c LCD backpack library for Spark Core, adapted for the Adafruit RGB LCD shield by gin
//-----------------------------------------------//
// I2C / SPI LCD BACKPACK LIBRARY FOR SPARK CORE //
//===============================================//
// Copy this into a new application at: //
// https://www.spark.io/build and go nuts! //
// !! Pinouts on line 427 below !! //
//-----------------------------------------------//
// Technobly / BDub - Jan 16th 2014 //
//===============================================//