Skip to content

Instantly share code, notes, and snippets.

View webknjaz's full-sized avatar
🇺🇦
#StandWithUkraine: https://github.com/vshymanskyy/StandWithUkraine

🇺🇦 Sviatoslav Sydorenko (Святослав Сидоренко) webknjaz

🇺🇦
#StandWithUkraine: https://github.com/vshymanskyy/StandWithUkraine
View GitHub Profile
@lukewpatterson
lukewpatterson / gist:4242707
Created December 9, 2012 00:24
squeezing private SSH key into .travis.yml file
Tricks to add encrypted private SSH key to .travis.yml file
To encrypt the private SSH key into the "-secure: xxxxx....." lines to place in the .travis.yml file, generate a deploy key then run: (to see what the encrypted data looks like, see an example here: https://github.com/veewee-community/veewee-push/blob/486102e6f508214b04414074c921475e5943f682/.travis.yml#L21
base64 --wrap=0 ~/.ssh/id_rsa > ~/.ssh/id_rsa_base64
ENCRYPTION_FILTER="echo \$(echo \"-\")\$(travis encrypt veewee-community/veewee-push \"\$FILE='\`cat $FILE\`'\" | grep secure:)"
split --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_base64 id_rsa_
@bencord0
bencord0 / etc-pam.d-nginx
Created December 16, 2012 23:40
nginx pam (and thus kerberos) authentication in gentoo. Copied from /usr/portage/www-servers/nginx/nginx-1.2.5.ebuild tweaked to add USE=pam
# /etc/pam.d/nginx
auth required /lib/security/pam_krb5.so
account required /lib/security/pam_krb5.so
@pi3ch
pi3ch / rc.lua
Created January 13, 2013 13:26
Textclock widget with tooltip for different cities/timezones in Awesome WM
-- Add to your rc.lua,
-- Create a textclock widget
mytextclock = awful.widget.textclock({ align = "right" })
mytestclock_tooltip = awful.tooltip({
objects = { mytextclock },
timer_function = function()
local now = os.time()
local utcdate = os.date("!*t", now)
local tehran_t = os.time(utcdate) + (3.5*3600)
local ljubljana_t = os.time(utcdate) + (1*3600)
@robotslave
robotslave / gist:4633393
Last active March 31, 2025 20:02
How to get Emoji in your Ubuntu Terminal
<!--
1. Download the Android Jelly Bean fonts and the Symbola font:
https://www.dropbox.com/s/tvtzcnzkvbe0nrt/jelly-bean-fonts.zip
http://users.teilar.gr/~g1951d/Symbola707.zip
2. unzip the files and put AndroidEmoji.ttf and Symbola.ttf (and any of the other fonts that strike your fancy)
in your ~/.fonts/ directory
3. run `fc-cache -f`. You can check to make sure the new fonts
were installed with `fc-list`. You'll probably want to grep the copious output for Symbola or Emoji
@kvnsmth
kvnsmth / example-subtree-usage.md
Last active March 24, 2025 17:21
A real world usage for git subtrees.

Let's say you have an iOS project, and you want to use some external library, like AFNetworking. How do you integrate it?

With submodules

Add the project to your repo:

git submodule add [email protected]:AFNetworking/AFNetworking.git Vendor/AFNetworking

or something to that effect.

# emerge --sync
# eselect profile set 1
# eselect news read new
# USE="-perl nginx_modules_http_gzip_static -nginx_modules_http_geo -X -alsa -cups -ant -vim" >> /etc/make.conf
# MAKEOPTS="-j1" >> /etc/make.conf
# emerge portage
# emerge eix
# eix-update
# emerge app-misc/screen
@petarpetrovic
petarpetrovic / ownCloud 5 config file (nginx)
Created March 14, 2013 17:56
This is the proper config file for nginx and ownCloud version 5. Please note that slight variations might need to be applied in order for your particular instance to work. This one works for me, hence this Gist. Everyone is free to fork it and make proper modifications for different server configurations.
# This is the complete example of nginx configuration file for ownCloud 5
# This config file configures proper rewrite rules for the new release of ownCloud
# Also, this config file configures nginx to listen on both IPv4 and IPv6 addresses
# If you want it to listen to IPv4 address only, use listen 80; instead of listen [::]:80
# First, we configure redirection to HTTPS (substitue owncloud.example.com with the proper address of your OC instance)
server {
listen [::]:80;
server_name owncloud.example.com;
@dideler
dideler / example.md
Last active November 14, 2024 03:33
A python script for extracting email addresses from text files.You can pass it multiple files. It prints the email addresses to stdout, one address per line.For ease of use, remove the .py extension and place it in your $PATH (e.g. /usr/local/bin/) to run it like a built-in command.
@cheeaun
cheeaun / firefoxos-phone-observations.md
Last active December 16, 2015 23:59
My observations on using Firefox OS phone, Peak, since 2 May 2013

My observations on using Firefox OS phone, Peak, since 2 May 2013

  • Auto-brightness is constantly changing when switching apps or views of an app, eventhough the surrounding ambient light doesn't change much. I've disabled it.
  • Press both 'Home' button and 'Sleep/wake' button, takes screenshot, like iPhone.
  • Gallery, Camera, Music app, etc don't work without a microSD memory card in the phone.
  • If 'USB mass storage' option is enabled in Settings app -> 'Media storage', Gallery and Camera app doesn't work while plugged in (charging) to the computer, stating that the memory card is in use.
  • 3 ways to install web apps; via Marketplace, Firefox browser or the Search screen. Sometimes generate different icons on the Home screen from each method.
  • Firefox browser seems to have a viewport issue, where web pages seems to be 2x zoomed out. Once the web page is added to Home screen, relaunch from there, the web page is no longer 2x zoomed out. [1] Marketplace app somehow still have issue.
  • Scrolling on t
@JoshCheek
JoshCheek / void_value_expressions.rb
Last active April 11, 2023 14:11
void value expressions make no sense
-> { a = case when true then return end } # this is allowed
-> { a = if true then return end } # this is not
-> { a = if true then return; 2 end } # this is
-> { a = (true && return) } # this is allowed
-> { a = (return && true) } # this is not
-> { a = begin; return
rescue; return
ensure; return