Skip to content

Instantly share code, notes, and snippets.

View iamtekeste's full-sized avatar
🕺
having fun with code

Tekeste Gebreanenia iamtekeste

🕺
having fun with code
View GitHub Profile
@iamtekeste
iamtekeste / credentials.yml
Created May 31, 2022 04:28 — forked from zsyed91/credentials.yml
Using Rails encrypted credentials with database.yml
# Used as the base secret for all MessageVerifiers in Rails, including the one protecting cookies.
secret_key_base: "key generated from <rails secret>"
production:
database_username: username
database_password: password
@iamtekeste
iamtekeste / react-query.d.ts
Created June 6, 2020 21:04 — forked from swyxio/react-query.d.ts
react query fixed working types - its not updated for v1 so i fixed locally
// Type definitions for react-query 0.3
// Project: https://github.com/tannerlinsley/react-query
// Definitions by: Lukasz Fiszer <https://github.com/lukaszfiszer>
// Jace Hensley <https://github.com/jacehensley>
// Matteo Frana <https://github.com/matteofrana>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { ComponentType } from 'react';
// overloaded useQuery function with pagination
@iamtekeste
iamtekeste / InkscapeBatchConvert.bat
Created March 25, 2020 22:20 — forked from JohannesDeml/README.md
Batch converter for windows using inkscape and the command line
@Echo off
set "inkscapePath=C:\Program Files\Inkscape\inkscape.exe"
set /a count=0
set validInput1=svg
set validInput2=pdf
set validInput3=eps
set validOutput1=eps
set validOutput2=pdf
set validOutput3=png
@iamtekeste
iamtekeste / build-dvisvgm.sh
Created January 17, 2020 15:08 — forked from tobywf/build-dvisvgm.sh
Build dvisvgm and kpathsea on macOS
#!/bin/bash
set -xeuo pipefail
IFS=$'\n\t'
PREFIX="${1:-/usr/local/dvisvgm}"
TEX="$(kpsewhich -var SELFAUTOLOC)"
echo "$PREFIX, $TEX"
brew install automake freetype ghostscript potrace
@iamtekeste
iamtekeste / table.mkdn
Created August 27, 2019 20:59 — forked from ngs/table.mkdn
Unicode character table

A

Description Entity Preview
A With Acute, Latin Capital Letter &#x00C1; Á
A With Acute, Latin Small Letter &#x00E1; á
A With Breve, Latin Small Letter &#x0103; ă
A With Caron, Latin Small Letter &#x01CE; ǎ
A With Circumflex, Latin Capital Letter &#x00C2; Â
A With Circumflex, Latin Small Letter &#x00E2; â
@iamtekeste
iamtekeste / background.html
Created November 9, 2018 21:29 — forked from erkie/background.html
Save parts of screen using Chrome extension
<script>
var Constants = {
saveURL: 'http://random/birthday/saveimage.php',
w: 500,
h: 500,
x: 200,
y: 200
};
@iamtekeste
iamtekeste / gifenc.sh
Created September 6, 2018 01:43 — forked from Brainiarc7/gifenc.sh
#gif with text overlay #generator using #ffmpeg - inspired by http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
#!/bin/bash
#parameters:
# $1 - mp4 url
# $2 - start time in format hh:mm:ss.mic
# $3 - duration in seconds
# $4 - text for gif overlay
# $5 - output file without extension
if [ "$#" -ne 5 ]
then
echo "Usage: gifenc.sh \$1 \$2 \$3 \$4 \$5
@iamtekeste
iamtekeste / README.md
Created August 8, 2018 18:54 — forked from oodavid/README.md
Backup MySQL to Amazon S3

Backup MySQL to Amazon S3

This is a simple way to backup your MySQL tables to Amazon S3 for a nightly backup - this is all to be done on your server :-)

Sister Document - Restore MySQL from Amazon S3 - read that next

1 - Install s3cmd

this is for Centos 5.6, see http://s3tools.org/repositories for other systems like ubuntu etc

@iamtekeste
iamtekeste / gist:5414131089cbcc6b117a10691abf9385
Created July 31, 2018 20:26 — forked from aral/gist:84ddf7ac37be079632ab
NSPopover .appearance property is NSAppearance in Swift, not NSPopoverAppearance as per the docs
// The docs say that the appearance property of an NSPopover should be set to an
// NSPopoverAppearance enum but it actually expects an NSAppearance instance.
// e.g., in an NSViewController subclass:
let popover = NSPopover()
popover.contentViewController = self.storyboard?.instantiateControllerWithIdentifier("someViewController") as? NSViewController
popover.appearance = NSAppearance(named: NSAppearanceNameVibrantLight)
popover.behavior = NSPopoverBehavior.Transient
@iamtekeste
iamtekeste / *.md
Created July 4, 2016 18:53 — forked from toddmotto/*.md
How I lost 20kg/3stone/44lbs

Everytime I tweet about losing weight and posting images, a lot of people ask questions - so thought I'd write something decent down about what I've done so far and am currently working on.

12 months change:

Necessary changes

Step 1: Fixing your diet

My diet used to be so so bad, energy drinks, constant sugar intake. Kill that! I also used to order takeaways at least 2-3 times a week, because it was easy and the bigger you get the lazier you get from my experience.