Skip to content

Instantly share code, notes, and snippets.

View opensourcekam's full-sized avatar
🎯
Focusing

✨OSKAM✨ opensourcekam

🎯
Focusing
View GitHub Profile
@jimjeffers
jimjeffers / gist:1043333
Created June 23, 2011 19:05
Apple's Elastic CSS Animations
<!DOCTYPE html>
<html>
<head>
<!-- Apple nicely commented all of these transitions on their source file:
http://images.apple.com/global/styles/productbrowser.css -->
<style type="text/css" media="screen">
/* Just some basic presentational CSS for the example */
a {
background: #000; display: block; color: #fff;
font: 1.5em "Lucida Grande", "Trebuchet MS", Verdana, sans-serif;
@hjr3
hjr3 / linkedin-api-invite
Created November 22, 2011 16:11
Simple example of using the LinkedIn JavaScript SDK to send an invite
<!DOCTYPE html>
<html>
<head>
<script>
function invite() {
var url = '/people/~/mailbox',
body = {
recipients: {
values: [{
person: {
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"

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

@adamjgrant
adamjgrant / about.md
Last active March 22, 2016 16:19
Scoped components is a pattern to group css classes and ids into "Components" which identify high-level units of visual organization in the application.

Scoped components

CSS class names quickly get out of hand. Repos end up with unorganized CSS files all over the place making it difficult to name things and find them in the code.

The scoped components pattern addresses this by grouping classes into "component" scopes.

<div data-component="news-menu">
  <h1 class="title">...</h1>
  <ul class="items">

...

@huntie
huntie / dsa-query-selector.js
Last active January 3, 2022 02:14
A simplified implementation of `document.querySelector()` and `document.querySelectorAll()`, during a workshop on data structures.
/**
* Run a callback over all children of a given element using depth-first
* traversal.
*
* @param {HTMLElement} element
* @param {Function} callback
*/
function iterateDOM(element, callback) {
const nodes = [];
@wojteklu
wojteklu / clean_code.md
Last active July 19, 2024 06:14
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@kevinhillinger
kevinhillinger / function.cs
Last active September 6, 2018 21:20
Azure Functions - Azure Blob Storage - Streaming block blobs
// generic use of SDK
var account = new CloudStorageAccount(credentials, true);
var client = new CloudBlobClient(account.BlobEndpoint.AbsoluteUri, account.Credentials);
var container = client.GetContainerReference("test");
var blob = container.GetBlobReference("CloudBlob.txt");
using (var stream = blob.OpenRead())
{
using (var reader = new StreamReader(stream))
{

List exif informations

# -s : Short output format
exiftool file.jpg -s
exiftool file.jpg -AllDates
exiftool file.jpg  -FileModifyDate
exiftool file.jpg -DateTimeOriginal
exiftool 20170411_220635.JPG -s | grep Date

exiftool -p "$DateTimeOriginal" "Photo - 01.JPG"
@softpunch
softpunch / colorVars.css
Last active June 14, 2022 06:44
CSS Variables For Color Manipulation
/* ----
css custom properties to manipulate color
MIT - 2017 - Soft Punch
https://gist.github.com/softpunch/
set initial "main" color via HSL values.
automatically calculate harmonies and variations of that color with pure css.
harmonies are determined solely by hue.