Skip to content

Instantly share code, notes, and snippets.

View Lycea's full-sized avatar

Lycea

  • Somewhere near the lake of constance (Germany)
View GitHub Profile
@dnozay
dnozay / jenkins.py
Last active February 13, 2020 15:02
urllib2 + jenkins basic auth when 403 - forbidden
# some servers do not send "401 retry" responses when authentication is needed
# and return "403 forbidden" instead; e.g. jenkins does that.
import urllib2
import logging
# configure logging for library
class NullHandler(logging.Handler):
def emit(self, record):
pass
@debreczeni
debreczeni / git-show-big-files.sh
Created May 2, 2012 16:41
Find large files in git repository
#!/bin/bash
#set -x
# Shows you the largest objects in your repo's pack file.
# Written for osx.
#
# @see http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
# @author Antony Stubbs
@benui-dev
benui-dev / spritebatch.lua
Created September 12, 2012 00:57
How to use Löve2d's SpriteBatch
function love.load()
-- Load our image we want to draw many times
image = love.graphics.newImage("dirt.png")
-- The number of tiles we want to draw is pretty much the number
-- that will fit on the screen
maxX = math.ceil(love.graphics.getWidth() / image:getWidth()) + 2
maxY = math.ceil(love.graphics.getHeight() / image:getHeight()) + 2
local size = maxX * maxY
print(size)
@szolotykh
szolotykh / twitter-post.py
Created January 29, 2015 16:52
Script post on twitter message and image with tweepy
import tweepy
import os
# Consumer keys and access tokens, used for OAuth
consumer_key = ''
consumer_secret = ''
access_token = ''
access_token_secret = ''
# OAuth process, using the keys and tokens
@icoxfog417
icoxfog417 / gist:ebaaac8779dc235d176e
Created October 28, 2014 02:13
Git ignore file mode (chmod) changes
git config core.fileMode false
@chewwt
chewwt / i3-gaps.sh
Last active February 3, 2023 15:00 — forked from dabroder/i3-gaps.sh
Install i3-gaps on ubuntu 20.04
#!/bin/bash
sudo apt install -y libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf libxcb-xrm0 libxcb-xrm-dev automake libxcb-shape0-dev libxcb-xrm-dev
cd /tmp
# clone the repository
git clone https://www.github.com/Airblader/i3 i3-gaps
cd i3-gaps
# compile & install
@rnwolf
rnwolf / gist:ed2944bb0dd023e77424769e929c428e
Created October 12, 2020 15:19
Org-Roam Layer for Spacemacs
;;"C:\Users\rnwol\.emacs.d\private\org-roam\packages.el"
(defconst org-roam-packages
'(org-roam))
(defun org-roam/init-org-roam ()
(use-package org-roam
:hook
(after-init . org-roam-mode)
:custom
(org-roam-directory "~/org-roam")
@safijari
safijari / orgmode_spacemacs.org
Last active May 30, 2023 16:11
Org mode spacemacs tutorial file

I hope the tutorial has been useful to you. If it was kindly leave a like and a comment, and consider subscribing and turning on subscription notifications. I intend to make more videos like this on the topics mentioned before as well as on other spacemacs topic like magit (git plugin), large scale refactoring, and a number of other things. Thank you so much for watching.

Org tutorial

Note: a great reference can be had here http://spacemacs.org/layers/+emacs/org/README.html

Outlines/headers

Show that each outline has it’s associated “text” under it

@dasgoll
dasgoll / gist:455522f09cb963872f64e23bb58804b2
Created January 28, 2017 15:42
Jenkins REST API example using crumb
Each Jenkins page has a REST API hyperlink at the bottom, this is because each page has its own endpoint.
http://localhost:8080/me
configure
Click 'Show API Token'
78e21f82a9e137614fef5b9593bcf827 = API Token
curl -s -u goll:78e21f82a9e137614fef5b9593bcf827 http://localhost:8080/crumbIssuer/api/json
@vitorhugomagalhaes
vitorhugomagalhaes / delete_git_tags.sh
Created July 12, 2019 11:05
Delete git tags #git #delete
#Fetch remote tags.
git fetch
#Delete remote tags.
git push origin --delete $(git tag -l)
#Delete local tags.
git tag -d $(git tag -l)