Skip to content

Instantly share code, notes, and snippets.

View lukas-h's full-sized avatar
🎯
Focusing

Lukas Himsel lukas-h

🎯
Focusing
  • Nuremberg, Germany
  • 00:01 (UTC +02:00)
View GitHub Profile
@akost
akost / convert.sh
Created April 4, 2012 19:06
Bash script for recursive file convertion windows-1251 --> utf-8
#!/bin/bash
# Recursive file convertion windows-1251 --> utf-8
# Place this file in the root of your site, add execute permission and run
# Converts *.php, *.html, *.css, *.js files.
# To add file type by extension, e.g. *.cgi, add '-o -name "*.cgi"' to the find command
find ./ -name "*.php" -o -name "*.html" -o -name "*.css" -o -name "*.js" -type f |
while read file
do
@dhavaln
dhavaln / filesystem.js
Created June 8, 2012 08:51
PhoneGap Filesystem Example
/**
* Prepare the App Folder
*/
(function(){
window.appRootDirName = ".myapp";
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
console.log("device is ready");
window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem;
@whitingx
whitingx / meta-tags.md
Created October 5, 2012 16:41 — forked from kevinSuttle/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@edsu
edsu / pizza.txt
Last active February 3, 2018 21:31
An example of looking up Pizza in Wikidata, to see the equivalent entities on other Wikipedias using the wggetentities call in the Wikidata API http://wikidata.org/w/api.php. The use of python as a filter on the end of curl is just to pretty print the JSON. You can obviously leave it off if you don't have Python available. In response to https:/…
curl "https://www.wikidata.org/w/api.php?action=wbgetentities&sites=itwiki&titles=Pizza&format=json" | python -mjson.tool
{
"entities": {
"q177": {
"descriptions": {
"de": {
"language": "de",
"value": "Gericht"
},
"en": {
@pete911
pete911 / gist:6219918
Last active December 31, 2020 00:39
jenkins with private github projects
- login to jenkins box (ssh)
- switch user to jenkins "sudo su -s /bin/bash jenkins"
- go to jenkins home directory "cd ~"
- generate keys (you need separate pair per github private project as the projects are on the same domain)
- "ssh-keygen -t rsa -f ~/.ssh/id_rsa_<project>" (replace <project> with your project name)
- repeat this for every github project
- crate "config" file in .ssh dir - "vim ~/.ssh/config" with the following content:
# <project1>
Host github.com-<project1>
HostName github.com
@nukos
nukos / _config.yml
Last active February 12, 2017 15:01
Jekyll Plugin: Liquid tag FontAwesome icon.
fa_prefix: #default: fa
fa_exclude:
@demisx
demisx / syntax.css
Last active February 20, 2020 04:32
Syntax highlighter CSS file
.highlight { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
@jonpecson
jonpecson / firebase-leaderboard.html
Last active December 16, 2022 12:21
Leaderboard Example (Firebase)
<html>
<head>
<script src="https://cdn.firebase.com/js/client/2.0.4/firebase.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="/resources/tutorial/css/example.css">
</head>
<body>
<div class="example-base example-leaderboard l-demo-container">
<table id="leaderboardTable">
@nukos
nukos / index.html
Created January 31, 2015 15:59
Jekyll for archive list
{% for post in site.posts %}
{% capture month %}{{ post.date | date: '%m%Y' }}{% endcapture %}
{% capture nmonth %}{{ post.next.date | date: '%m%Y' }}{% endcapture %}
{% if month != nmonth %}
<li class="list-item">
<a href="/{{ post.date | date: '%Y/%m/' }}">
<span class="item-year" title="{{ post.date | date: '%Y年' }}">{{ post.date | date: '%Y' }}</span>
<span class="item-month" title="{{ post.date | date: '%m月' }}">{{ post.date | date: '%m' }}</span>
</a>
</li>
@JeffPaine
JeffPaine / i3-cheat-sheet.md
Last active June 10, 2024 10:58
i3 Window Manager Cheat Sheet

i3 Window Manager Cheat Sheet

$mod refers to the modifier key (alt by default)

General

  • startx i3 start i3 from command line
  • $mod+<Enter> open a terminal
  • $mod+d open dmenu (text based program launcher)
  • $mod+r resize mode ( or to leave resize mode)
  • $mod+shift+e exit i3