Skip to content

Instantly share code, notes, and snippets.

View darknos's full-sized avatar

Sergey Nosenko darknos

View GitHub Profile
@darknos
darknos / gtb
Created November 16, 2020 16:51 — forked from dschuetz/gtb
Hackish script to compute Google Authenticator tokencodes and launch a Tunnelblick VPN with the appropriate computed password+tokencode
#!/usr/bin/python
import hmac, struct, time, base64, hashlib # for totp generation
import re, sys, subprocess # for general stuff
from getopt import getopt, GetoptError # pretending to be easy-to-use
#
# gtb - Google(auth) + Tunnelblick
#
@darknos
darknos / angular-repeater.html
Created September 22, 2016 13:40 — forked from JustMaier/angular-repeater.html
AutoFields Repeater
<div class="autofields-repeater">
<div ui-sortable="sortableOptions" ng-model="ngModel">
<div class="autofields-repeater-container panel panel-default" ng-repeat="item in ngModel">
<div class="panel-heading">
<h4 class="panel-title" ng-bind="field.title"></h4>
<button type="button" class="close" title="Remove" ng-click="removeItem(item, $index)">&times;</button>
</div>
<auto:fields fields="field.fields" class="panel-body" data="item" options="field.options" form="item{{$index}}"></auto:fields>
</div>
</div>
@darknos
darknos / README.md
Created March 1, 2016 12:20 — forked from yomybaby/README.md
iOS7 Colors CommonJS module.Color code from http://codepen.io/ChrisNager/pen/qjbdt I had a test for Titanium Mobile only. But you can use this for any platform supporting hex color code.
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
/**
* Class name: FileUtils.js
* Author: Codeboxed
* URL: http://www.codeboxed.com
* Date: March 5, 2011
* Platform: Titanium
*/
var FileUtils = function (){
/*
* I made this code for an upcoming hackaton, so, it's really, really ugly. Feel free
* to update it here so everyone will be able to use it correctly.
*
* It's pretty easy to understand, basicly the object you want to edit, an overlay,
* four handlers, and the background view.
*
* It's currently made for/tested on iPad 5.0 with Timob 2.0.2; works only in landscape.
*
* This code is under the Moustach licence. This means you can do whatever you want with
/**
* Appcelerator Titanium Mobile
* Copyright (c) 2009-2013 by Appcelerator, Inc. All Rights Reserved.
* Licensed under the terms of the Apache Public License
* Please see the LICENSE included with this distribution for details.
*
* WARNING: This is generated code. Modify at your own risk and without support.
*/
#ifdef USE_TI_UILISTVIEW