Skip to content

Instantly share code, notes, and snippets.

View echirchir's full-sized avatar

Elisha Chirchir echirchir

View GitHub Profile
@echirchir
echirchir / rename-files.py
Created June 16, 2022 20:59 — forked from JacobMuchow/rename-files.py
Bulk file renaming script with regex
# Python 3
# Bulk file renaming script
# importing os module
import os
import re
import sys
import glob
if len(sys.argv) != 5:
docker exec -i 3786bca0a2ce psql -U postgres -d postgres < ./path/to/dump-db.dump
#START WITH A NON-GIT FOLDER WITH STABLE CODE
STEP 1: Create a repository on github and copy the git url to clipboard
STEP 2: Switch to your project folder on your terminal (cd project_folder_1)
STEP 3: Convert your folder into a git repo using git init on your terminal
STEP 4: After converting your folder into a git folder, add all the files
(you can create a .gitignore for files you don't want to include) using git add --all
STEP 5: Commit all the changes using git commit -m "Initial commit for project x"
STEP 6: Add remote origin e.g :- git remote add origin https://github.com/echirchir/demo-projects.git
STEP 7: Push the code to the remote server: git push (The first time you push a new branch to github,
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':payment:payment-rest-api:compileJava'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:205)
at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:263)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:203)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:184)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:114)
at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:62)
at org.gradle.api.internal.tasks.
@echirchir
echirchir / demo.rake
Created January 10, 2020 23:34 — forked from edavis10/demo.rake
Rake tasks to create tons of data for Redmine
# Still a work in progress but is good enough for development
#
# `rake redmine:demo_data` for it all
# `rake redmine:demo_data:users`
# `rake redmine:demo_data:projects`
# `rake redmine:demo_data:issues`
# `rake redmine:demo_data:time_entries`
require 'faker'
require 'random_data'
@echirchir
echirchir / Promotions.java
Last active May 24, 2018 21:57
PromotionManager.java
public void applyPromotionMatrix(CashOrder cashOrder, int item_id){
SpecialPromoPrice promoPrice = realm.where(SpecialPromoPrice.class).equalTo("itemId", item_id).findFirst();
Product product;
if (promoPrice != null){
int freeItems = Integer.parseInt(promoPrice.getQuantity());
<table width="50%" border="1">
<tr>
<th rowspan="2">YEAR</th>
<th colspan="2">Student Details</th><th colspan="4">Registered Examinations</th>
<tr>
<td>Student Reg. No</td>
<td>Student Names</td>
<td>BIT 1101</td>
private static ArrayList<String> possibilities = new ArrayList<>();
public static void main(String[] args) {
String s = "abcd";
loop(s, null);
for(String string : possibilities)
System.out.println(string);
}
@echirchir
echirchir / List.md
Created March 19, 2016 07:45 — forked from msurguy/List.md
List of open source projects made with Laravel

Other people's projects:

My projects (tutorials are on my blog at http://maxoffsky.com):

object(PHPMailer)#2193 (73) {
["Version"]=>
string(6) "5.2.10"
["Priority"]=>
int(3)
["CharSet"]=>
string(5) "UTF-8"
["ContentType"]=>
string(10) "text/plain"
["Encoding"]=>