Skip to content

Instantly share code, notes, and snippets.

@inbalj
inbalj / happybday.py
Last active May 24, 2024 18:45
Happy Birthday in Python
'''
Based on Mitul patel code
https://youtu.be/JDA4XzsGn4w
Can be run throug this app
https://repl.it/repls/PlumpColorlessGnudebugger
'''
import turtle
mitul=turtle.Turtle()
@inbalj
inbalj / caldera_form_edit_hidden_field_value.php
Created December 13, 2017 06:48
Caldera Form edit hidden field value
<?php
/**
* Example how to find entry id and edit the value of a hidden field
**/
$form_id = 'CF5a115b49135d9';
$field_id = 'fld_2303149';
// get entry id
$entry_id = Caldera_Forms::get_field_data( '_entry_id', $form_id );
@inbalj
inbalj / Usefull linux commands
Last active February 14, 2017 05:58
Usefull linux commands
Generate login-link
-------------------
reset user 1 password in db
UPDATE users SET pass = md5(‘123456789’) where uid = 1;
Drush can generate a one-time login link.
----------------------------------------
drush uli
// paste this in a new module
function module_hook_init() {
ctools_include('ajax');
ctools_include('modal');
// Add CTools' javascript to the page.
ctools_modal_add_js();
// Create our own javascript that will be used to theme a modal.
$popup_style = array(
'MessagePopup' => array(
@inbalj
inbalj / .bash_aliases
Last active December 16, 2020 18:31
Linux Bash and scripts
#!/bin/bash
#
# All the alias for you linux
#
#
# Some more ls aliases
alias e='exit'