Skip to content

Instantly share code, notes, and snippets.

View oktayacikalin's full-sized avatar

Oktay Acikalin oktayacikalin

View GitHub Profile
@oktayacikalin
oktayacikalin / pass.md
Created January 19, 2022 08:44 — forked from abtrout/pass.md
Using password-store with git repository synching

Password-store keeps your passwords (or any other sensitive information) saved in GnuPG encrypted files organized in ~/.password-store. For more information about GPG, consult the GNU Privacy Handbook.

Getting started

To get started, install pass and generate a keypair.

$ brew install pass
$ gpg --gen-key
$ gpg --list-keys
@oktayacikalin
oktayacikalin / solarized_setup.js
Created February 2, 2016 19:23 — forked from baldwicc/solarized_setup.js
Solarized Light and Solarized Dark for Chrome Secure Shell (nassh), with fonts
/**
* STEP 1: Setup
* - Open Chrome Secure Shell settings
* - Open JS Console (CTRL+SHIFT+J)
* - Copy and paste the following:
*/
var s7d_colours = {
'base03': '#002b36',
'base02': '#073642',
'base01': '#586e75',
@oktayacikalin
oktayacikalin / Article.md
Created January 15, 2016 06:10 — forked from Warry/Article.md
How to make faster scroll effects?

How to make faster scroll effects?

  • Avoid too many reflows (the browser to recalculate everything)
  • Use advanced CSS3 for graphic card rendering
  • Precalculate sizes and positions

Beware of reflows

The reflow appens as many times as there are frames per seconds. It recalculate all positions that change in order to diplay them. Basically, when you scroll you execute a function where you move things between two reflows. But there are functions that triggers reflows such as jQuery offset, scroll... So there are two things to take care about when you dynamically change objects in javascript to avoid too many reflows:

@oktayacikalin
oktayacikalin / howto
Last active December 16, 2015 15:53
Create an initial empty commit in Git for further branching.Based on: http://kevin.deldycke.com/2010/05/initialize-git-repositories/
git commit --allow-empty -m 'Initial commit'
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<style id="jsbin-css">
textarea{
height:150px;
}
@oktayacikalin
oktayacikalin / new_gist_file_0
Created May 28, 2015 06:38
How to mount a partition inside a disk image
http://ubuntuforums.org/archive/index.php/t-1576011.html
---
To mount a partition inside the disk image you need to calculate the offset of where the partition starts.
parted picked.img
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@oktayacikalin
oktayacikalin / Block.php
Created March 25, 2015 08:31
Reusing/Sharing a frontend template in admin
public function __construct()
{
parent::__construct();
$this->setData('area','frontend');
$this->setTemplate('customer/online.phtml');
}
<?php
/**
* Set global/skip_process_modules_updates to '1' in app/etc/local.xml and
* then use this script to apply updates and refresh the config cache without
* causing a stampede on the config cache.
*
* @author Colin Mollenhour
*/
umask(0);
ini_set('memory_limit','512M');
@oktayacikalin
oktayacikalin / workspace-switch-notifier.py
Created September 14, 2014 13:21
Gtk, Wnck Workspace switch notifier in Python http://pastebin.com/RVAsutaj
#!/usr/bin/env python3
from gi.repository import Wnck, Gtk, Notify
import signal, time
class Kludge:
def __init__(self):
self.first = True
signal.signal(signal.SIGINT, signal.SIG_DFL)
self.screen = Wnck.Screen.get_default()