Skip to content

Instantly share code, notes, and snippets.

View iMilnb's full-sized avatar

iMil iMilnb

View GitHub Profile
@tsutsui
tsutsui / expand-image-fssize-rpi.sh
Last active October 29, 2019 19:31
A dumb sh script that will expand NetBSD partition and BSD FFS partition in the RPI image prepared by Jun Ebihara: http://mail-index.netbsd.org/port-arm/2013/06/19/msg001882.html
#! /bin/sh
#
# Copyright (c) 2013 Izumi Tsutsui. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
@xbot
xbot / gtkrc-2.0.mine
Last active June 22, 2017 13:37
gtkrc-2.0.mine for vim fixes
# fix for gvim border
style "vim-fix" {
bg[NORMAL] = "#002B36" # this matches my gvim theme 'Normal' bg color.
fg[NORMAL] = "#ffffff"
}
style "vim-fix-tabs" {
bg[NORMAL] = shade(1.02, "#656565")
bg[ACTIVE] = shade(1.25, "#878787")
fg[ACTIVE] = "#323232"
@angstwad
angstwad / test_split_jinja_ansible.yml
Created March 31, 2014 14:24
Splitting in Jinja2/Ansible
---
- name: Test split
hosts: localhost
gather_facts: false
vars:
- facter_blockdevices: "sda,sdb,sdc,sdd,sde,sdf"
tasks:
- name: Let's split
debug: var=item
with_items: "facter_blockdevices.split(',')"
@nyg
nyg / kraken-ledger.js
Created May 30, 2014 21:32
Get all entries of your Kraken.com ledger.
/* Querying your ledger through Kraken's API only return 50 results... */
var KrakenClient = require('kraken-api'); // https://github.com/nothingisdead/npm-kraken-api
var kraken = new KrakenClient('api_key', 'api_secret');
var ledger = [];
var offset = 0;
function getLedgerEntries (error, data) {
@hugomaiavieira
hugomaiavieira / lock-screen.sh
Last active September 8, 2022 16:12
Script to lock and turn off the screen on linux mint
#! /bin/bash
#
# How to use it
#
# $ chmod +x lock-screen
#
# $ ./lock-screen.sh
#
# You can create a custom keyborad shortcut (like Super+l) that call this script
#
@shahril96
shahril96 / conkyrc
Created November 28, 2014 18:11
My simple conkyrc file. :)
#========================================================================
# Conky-Serdar
#----------------------------------------------------------------------
#sudo apt-get install conky
#extract the zip file and move files to .conky in your home folder
#----------------------------------------------------------------------
#Run(Terminal):
# conky -c ~/.conky/conkyrc
#----------------------------------------------------------------------
#Autostart(Openbox):
@subfuzion
subfuzion / curl.md
Last active May 8, 2024 04:57
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

@CMCDragonkai
CMCDragonkai / memory_layout.md
Last active April 28, 2024 18:50
Linux: Understanding the Memory Layout of Linux Executables

Understanding the Memory Layout of Linux Executables

Required tools for playing around with memory:

  • hexdump
  • objdump
  • readelf
  • xxd
  • gcore
@justinsoliz
justinsoliz / resources.tf
Created August 30, 2016 15:26
Terraform S3 to Lambda notification
provider "aws" {
access_key = "${var.access_key}"
secret_key = "${var.secret_key}"
region = "${var.region}"
}
resource "aws_iam_role" "iam_for_terraform_lambda" {
name = "app_${var.app_env}_lambda"
assume_role_policy = <<EOF
{
@bowmanmike
bowmanmike / dynamic_function_calls.go
Created February 22, 2017 19:06
Golang Dynamic Function Calling
package main
import (
"fmt"
)
// Use map[string]interface{} to pair functions to name
// Could maybe use anonymous functions instead. Might be clean
// in certain cases
var funcMap = map[string]interface{}{