Skip to content

Instantly share code, notes, and snippets.

View lorddarq's full-sized avatar
💭
Looking for a new opportunity

Sorin Jurcut lorddarq

💭
Looking for a new opportunity
View GitHub Profile
@lorddarq
lorddarq / scrollToElement.js
Created October 9, 2012 08:25
function to scroll to a specific element in the page
//replace #fromA with your button/control and #toB with the target to which you wanna scroll to.
$("#fromA").click(function() {
$("html, body").animate({ scrollTop: $("#toB").offset().top }, 1500);
console.log('executed scrollToElement');
return true;
});
@lorddarq
lorddarq / export_images
Created January 6, 2014 14:18
Exports each layercomp as a new file. Uses smart filesize based on original file.
#target Photoshop
//Initialize Photoshop & choose what file is processed via openDialog
app.bringToFront();
var filepath = File.openDialog ();
var fileRef = File(filepath);
var docRef = app.open(fileRef);
//required Variables
#target Photoshop
//Initialize Photoshop & choose what file is processed
app.bringToFront();
var filepath = File.openDialog ();
var fileRef = File(filepath);
var docRef = app.open(fileRef);
//required Variables
var i=0;
#target Photoshop
//Initialize Photoshop & choose what file is processed
app.bringToFront();
var filepath = File.openDialog ();
var fileRef = File(filepath);
var docRef = app.open(fileRef);
//required Variables
var i=0;
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- google's material design colours from
http://www.google.com/design/spec/style/color.html#color-ui-color-palette -->
<!--reds-->
<color name="md_red_50">#fde0dc</color>
<color name="md_red_100">#f9bdbb</color>
<color name="md_red_200">#f69988</color>
@lorddarq
lorddarq / cleanup.sh
Created January 4, 2016 14:39
This is a shellscript to be used with the Android-Sketch workflow as described in the following medium article: https://medium.com/@lmindler/using-sketch-3-and-a-bit-of-fairy-dust-for-a-better-android-workflow-f667d0048855#.wvtamf346
cd ../Desktop/res/; mkdir -p drawable-xxhdpi; mkdir -p drawable-xhdpi; mkdir -p drawable-hdpi; mkdir -p drawable-mdpi
for file in $(find . -type f -iname '*-xxhdpi*'); do
mv "$file" "drawable-xxhdpi/${file/-xxhdpi/}";
done
for file in $(find . -type f -iname '*-xhdpi*'); do
mv "$file" "drawable-xhdpi/${file/-xhdpi/}";
done
for file in $(find . -type f -iname '*-hdpi*'); do
@lorddarq
lorddarq / ContentView.swift
Created June 15, 2024 21:27 — forked from lostincode/ContentView.swift
MeshGradient Playground iOS 18
//
// ContentView.swift
// MeshGradientPlayground
//
// Created by Bill Richards on 6/14/24.
//
import SwiftUI
struct ContentView: View {